Arcane  v4.1.0.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
MeshKind.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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/* Caractéristiques d'un maillage. */
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//! Structure du maillage
29{
30 //! Structure inconnu ou pas initialisée
32 //! Maillage non structuré
34 //! Maillage cartésien
36 //! Maillage polyedrique
38};
39
40extern "C++" ARCANE_CORE_EXPORT std::ostream&
41operator<<(std::ostream& o, eMeshStructure r);
42
43/*---------------------------------------------------------------------------*/
44/*---------------------------------------------------------------------------*/
45
46//! Type de maillage AMR
47enum class eMeshAMRKind
48{
49 //! Le maillage n'est pas AMR
51 //! Le maillage est AMR par maille
53 //! Le maillage est AMR par patch
55 //! Le maillage est AMR par patch cartésien (rectangulaire)
57};
58
59extern "C++" ARCANE_CORE_EXPORT std::ostream&
60operator<<(std::ostream& o, eMeshAMRKind r);
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
65/*!
66 * \brief Types de gestion de la dimension du maillage.
67 *
68 * \warning Les modes autres que eMeshCellDimensionKind::MonoDimension sont
69 * expérimentaux et ne sont supportés que pour eMeshStructure::Unstructured.
70 */
72{
73 //! Les mailles ont la même dimension que le maillage
75 /*!
76 * \brief Les mailles ont la même dimension que le maillage ou une dimension inférieure.
77 *
78 ** \warning Ce mode est expérimental.
79 */
81 /*!
82 * \brief Maillage non manifold.
83 *
84 * Le maillage est MultiDimension et non manifold.
85 * Dans ce cas, si le maillage est 3D, les mailles 2D ont des arêtes (Edge)
86 * au lieu des faces (Face).
87 *
88 * \warning Ce mode est expérimental.
89 */
91};
92
93extern "C++" ARCANE_CORE_EXPORT std::ostream&
94operator<<(std::ostream& o, eMeshCellDimensionKind r);
95
96/*---------------------------------------------------------------------------*/
97/*---------------------------------------------------------------------------*/
98/*!
99 * \brief Caractéristiques d'un maillage.
100 *
101 * Pour l'instant les caractéristiques sont :
102 *
103 * - la structure du maillage (eMeshStructure)
104 * - le type d'AMR
105 * - la gestion de la dimension des mailles (eMeshDimensionKind). Cette dernière
106 *
107 * \note Le support de maillages autres que eMeshDimensionKind.MonoDimension
108 * est expérimental.
109 */
110class ARCANE_CORE_EXPORT MeshKind
111{
112 public:
113
114 eMeshStructure meshStructure() const { return m_structure; }
115 eMeshAMRKind meshAMRKind() const { return m_amr_kind; }
116 eMeshCellDimensionKind meshDimensionKind() const { return m_dimension_kind; }
117 //! Vrai si la structure du maillage est eMeshCellDimensionKind::NonManifold
118 bool isNonManifold() const { return m_dimension_kind == eMeshCellDimensionKind::NonManifold; }
119 //! Vrai si la structure du maillage est eMeshCellDimensionKind::MonoDimension
120 bool isMonoDimension() const { return m_dimension_kind == eMeshCellDimensionKind::MonoDimension; }
121 void setMeshStructure(eMeshStructure v) { m_structure = v; }
122 void setMeshAMRKind(eMeshAMRKind v) { m_amr_kind = v; }
123 void setMeshDimensionKind(eMeshCellDimensionKind v) { m_dimension_kind = v; }
124
125 private:
126
127 eMeshStructure m_structure = eMeshStructure::Unknown;
128 eMeshAMRKind m_amr_kind = eMeshAMRKind::None;
129 eMeshCellDimensionKind m_dimension_kind = eMeshCellDimensionKind::MonoDimension;
130};
131
132/*---------------------------------------------------------------------------*/
133/*---------------------------------------------------------------------------*/
134
135} // namespace Arcane
136
137/*---------------------------------------------------------------------------*/
138/*---------------------------------------------------------------------------*/
139
140#endif
Déclarations des types généraux de Arcane.
Maille d'un maillage.
Definition Item.h:1214
Caractéristiques d'un maillage.
Definition MeshKind.h:111
bool isNonManifold() const
Vrai si la structure du maillage est eMeshCellDimensionKind::NonManifold.
Definition MeshKind.h:118
bool isMonoDimension() const
Vrai si la structure du maillage est eMeshCellDimensionKind::MonoDimension.
Definition MeshKind.h:120
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eMeshCellDimensionKind
Types de gestion de la dimension du maillage.
Definition MeshKind.h:72
@ MultiDimension
Les mailles ont la même dimension que le maillage ou une dimension inférieure.
Definition MeshKind.h:80
@ NonManifold
Maillage non manifold.
Definition MeshKind.h:90
@ MonoDimension
Les mailles ont la même dimension que le maillage.
Definition MeshKind.h:74
eMeshStructure
Structure du maillage.
Definition MeshKind.h:29
@ Unknown
Structure inconnu ou pas initialisée.
Definition MeshKind.h:31
@ Cartesian
Maillage cartésien.
Definition MeshKind.h:35
@ Unstructured
Maillage non structuré
Definition MeshKind.h:33
@ Polyhedral
Maillage polyedrique.
Definition MeshKind.h:37
std::ostream & operator<<(std::ostream &ostr, eItemKind item_kind)
Opérateur de sortie sur un flot.
eMeshAMRKind
Type de maillage AMR.
Definition MeshKind.h:48
@ Patch
Le maillage est AMR par patch.
Definition MeshKind.h:54
@ None
Le maillage n'est pas AMR.
Definition MeshKind.h:50
@ PatchCartesianMeshOnly
Le maillage est AMR par patch cartésien (rectangulaire)
Definition MeshKind.h:56