Arcane  4.1.12.0
User 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
28//! Mesh structure
30{
31 //! Unknown or not initialized
33 //! Unstructured mesh
35 //! Cartesian mesh
37 //! Polyhedral mesh
39};
40
41extern "C++" ARCANE_CORE_EXPORT std::ostream&
42operator<<(std::ostream& o, eMeshStructure r);
43
44/*---------------------------------------------------------------------------*/
45/*---------------------------------------------------------------------------*/
46
47//! AMR mesh type
48enum class eMeshAMRKind
49{
50 //! The mesh is not AMR
52 //! The mesh is AMR by cell
54 //! The mesh is AMR by patch
56 //! The mesh is AMR by Cartesian patch (rectangular)
58};
59
60extern "C++" ARCANE_CORE_EXPORT std::ostream&
61operator<<(std::ostream& o, eMeshAMRKind r);
62
63/*---------------------------------------------------------------------------*/
64/*---------------------------------------------------------------------------*/
65
66/*!
67 * \brief Types of mesh dimension management.
68 *
69 * \warning Modes other than eMeshCellDimensionKind::MonoDimension are
70 * experimental and are only supported for eMeshStructure::Unstructured.
71 */
73{
74 //! The cells have the same dimension as the mesh
76 /*!
77 * \brief The cells have the same dimension as the mesh or a lower dimension.
78 *
79 ** \warning This mode is experimental.
80 */
82 /*!
83 * \brief Non-manifold mesh.
84 *
85 * The mesh is MultiDimension and non-manifold.
86 * In this case, if the mesh is 3D, the 2D cells have edges (Edge)
87 * instead of faces (Face).
88 *
89 * \warning This mode is experimental.
90 */
92};
93
94extern "C++" ARCANE_CORE_EXPORT std::ostream&
95operator<<(std::ostream& o, eMeshCellDimensionKind r);
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
100/*!
101 * \brief Characteristics of a mesh.
102 *
103 * For now, the characteristics are:
104 *
105 * - the mesh structure (eMeshStructure)
106 * - the AMR type
107 * - the cell dimension management (eMeshDimensionKind). The latter
108 *
109 * \note Support for meshes other than eMeshDimensionKind.MonoDimension
110 * is experimental.
111 */
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; }
119 //! True if the mesh structure is eMeshCellDimensionKind::NonManifold
120 bool isNonManifold() const { return m_dimension_kind == eMeshCellDimensionKind::NonManifold; }
121 //! True if the mesh structure is eMeshCellDimensionKind::MonoDimension
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
std::ostream & operator<<(std::ostream &ostr, eItemKind item_kind)
Output operator for a stream.
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