Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
MeshKind.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* MeshKind.h (C) 2000-2025 */
9/* */
10/* Characteristics of a mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_MESHKIND_H
13#define ARCANE_CORE_MESHKIND_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
40
41extern "C++" ARCANE_CORE_EXPORT std::ostream&
42operator<<(std::ostream& o, eMeshStructure r);
43
44/*---------------------------------------------------------------------------*/
45/*---------------------------------------------------------------------------*/
46
59
60extern "C++" ARCANE_CORE_EXPORT std::ostream&
61operator<<(std::ostream& o, eMeshAMRKind r);
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
93
94extern "C++" ARCANE_CORE_EXPORT std::ostream&
95operator<<(std::ostream& o, eMeshCellDimensionKind r);
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
112class ARCANE_CORE_EXPORT MeshKind
113{
114 public:
115
116 eMeshStructure meshStructure() const { return m_structure; }
117 eMeshAMRKind meshAMRKind() const { return m_amr_kind; }
118 eMeshCellDimensionKind meshDimensionKind() const { return m_dimension_kind; }
120 bool isNonManifold() const { return m_dimension_kind == eMeshCellDimensionKind::NonManifold; }
122 bool isMonoDimension() const { return m_dimension_kind == eMeshCellDimensionKind::MonoDimension; }
123 void setMeshStructure(eMeshStructure v) { m_structure = v; }
124 void setMeshAMRKind(eMeshAMRKind v) { m_amr_kind = v; }
125 void setMeshDimensionKind(eMeshCellDimensionKind v) { m_dimension_kind = v; }
126
127 private:
128
129 eMeshStructure m_structure = eMeshStructure::Unknown;
130 eMeshAMRKind m_amr_kind = eMeshAMRKind::None;
131 eMeshCellDimensionKind m_dimension_kind = eMeshCellDimensionKind::MonoDimension;
132};
133
134/*---------------------------------------------------------------------------*/
135/*---------------------------------------------------------------------------*/
136
137} // namespace Arcane
138
139/*---------------------------------------------------------------------------*/
140/*---------------------------------------------------------------------------*/
141
142#endif
Declarations of Arcane's general types.
Cell of a mesh.
Definition Item.h:1300
Characteristics of a mesh.
Definition MeshKind.h:113
bool isNonManifold() const
True if the mesh structure is eMeshCellDimensionKind::NonManifold.
Definition MeshKind.h:120
bool isMonoDimension() const
True if the mesh structure is eMeshCellDimensionKind::MonoDimension.
Definition MeshKind.h:122
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eMeshCellDimensionKind
Types of mesh dimension management.
Definition MeshKind.h:73
@ MultiDimension
The cells have the same dimension as the mesh or a lower dimension.
Definition MeshKind.h:81
@ NonManifold
Non-manifold mesh.
Definition MeshKind.h:91
@ MonoDimension
The cells have the same dimension as the mesh.
Definition MeshKind.h:75
eMeshStructure
Mesh structure.
Definition MeshKind.h:30
@ Unknown
Unknown or not initialized.
Definition MeshKind.h:32
@ Cartesian
Cartesian mesh.
Definition MeshKind.h:36
@ Unstructured
Unstructured mesh.
Definition MeshKind.h:34
@ Polyhedral
Polyhedral mesh.
Definition MeshKind.h:38
eMeshAMRKind
AMR mesh type.
Definition MeshKind.h:49
@ Patch
The mesh is AMR by patch.
Definition MeshKind.h:55
@ None
The mesh is not AMR.
Definition MeshKind.h:51
@ PatchCartesianMeshOnly
The mesh is AMR by Cartesian patch (rectangular).
Definition MeshKind.h:57