Arcane  v4.1.4.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
CartesianPatch.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/* CartesianPatch.h (C) 2000-2026 */
9/* */
10/* Patch AMR d'un maillage cartésien. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_CARTESIANPATCH_H
13#define ARCANE_CARTESIANMESH_CARTESIANPATCH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19#include "arcane/cartesianmesh/ICartesianMeshPatch.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
33class ARCANE_CARTESIANMESH_EXPORT CartesianPatch
34{
35 public:
36
38 CartesianPatch() = default;
39
41 explicit CartesianPatch(ICartesianMeshPatch* patch_interface)
42 : m_patch(patch_interface)
43 {
44 }
45 CartesianPatch& operator=(const CartesianPatch&) = default;
46 CartesianPatch& operator=(ICartesianMeshPatch* patch_interface)
47 {
48 m_patch = patch_interface;
49 return (*this);
50 }
51
52 public:
53
55 CellGroup cells() const;
56
62 CellGroup inPatchCells() const;
63
70
72 Integer index() const;
73
79 Integer level() const
80 {
81 ARCANE_CHECK_POINTER(m_patch);
82 return m_patch->position().level();
83 }
84
87 {
88 ARCANE_CHECK_POINTER(m_patch);
89 return m_patch->cellDirection(dir);
90 }
91
94 {
95 ARCANE_CHECK_POINTER(m_patch);
96 return m_patch->cellDirection(idir);
97 }
98
101 {
102 ARCANE_CHECK_POINTER(m_patch);
103 return m_patch->faceDirection(dir);
104 }
105
108 {
109 ARCANE_CHECK_POINTER(m_patch);
110 return m_patch->faceDirection(idir);
111 }
112
115 {
116 ARCANE_CHECK_POINTER(m_patch);
117 return m_patch->nodeDirection(dir);
118 }
119
122 {
123 ARCANE_CHECK_POINTER(m_patch);
124 return m_patch->nodeDirection(idir);
125 }
126
128 void checkValid() const
129 {
130 ARCANE_CHECK_POINTER(m_patch);
131 m_patch->checkValid();
132 }
133
141 {
142 ARCANE_CHECK_POINTER(m_patch);
143 return m_patch->position();
144 }
145
147 bool isNull() const { return !m_patch; }
148
150 ICartesianMeshPatch* patchInterface() const { return m_patch; }
151
152 private:
153
154 ICartesianMeshPatch* m_patch = nullptr;
155};
156
157/*---------------------------------------------------------------------------*/
158/*---------------------------------------------------------------------------*/
159
160} // End namespace Arcane
161
162/*---------------------------------------------------------------------------*/
163/*---------------------------------------------------------------------------*/
164
165#endif
166
#define ARCANE_CHECK_POINTER(ptr)
Macro retournant le pointeur ptr s'il est non nul ou lancant une exception s'il est nul.
Déclarations de types sur les entités.
Classe permettant de définir la position d'un patch dans le maillage cartésien.
Patch AMR d'un maillage cartésien.
Integer index() const
Index du patch dans le tableau des patchs.
FaceDirectionMng & faceDirection(eMeshDirection dir)
Liste des faces dans la direction dir.
NodeDirectionMng & nodeDirection(Integer idir)
Liste des noeuds dans la direction dir (0, 1 ou 2)
NodeDirectionMng & nodeDirection(eMeshDirection dir)
Liste des noeuds dans la direction dir.
AMRPatchPosition position() const
Méthode permettant de récupérer la position du patch dans le maillage cartesien.
CellGroup overlapCells() const
Groupe de mailles de recouvrement du patch.
bool isNull() const
Indique si le patch est nul.
CellDirectionMng & cellDirection(Integer idir)
Liste des mailles dans la direction dir (0, 1 ou 2)
CartesianPatch()=default
Patch nul.
FaceDirectionMng & faceDirection(Integer idir)
Liste des faces dans la direction dir (0, 1 ou 2)
ICartesianMeshPatch * patchInterface() const
Interface associée au patch (pour compatibilité avec l'existant)
CartesianPatch(ICartesianMeshPatch *patch_interface)
Patch nul.
CellDirectionMng & cellDirection(eMeshDirection dir)
Liste des mailles dans la direction dir.
void checkValid() const
Effectue des vérifications sur la validité de l'instance.
Integer level() const
Niveau du patch.
Infos sur les mailles d'une direction spécifique X,Y ou Z d'un maillage structuré.
Infos sur les face d'une direction spécifique X,Y ou Z d'un maillage structuré.
Interface d'un patch AMR d'un maillage cartésien.
Infos sur les noeuds d'une direction spécifique X,Y ou Z d'un maillage structuré.
ItemGroupT< Cell > CellGroup
Groupe de mailles.
Definition ItemTypes.h:183
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 Integer
Type représentant un entier.
eMeshDirection
Type de la direction pour un maillage structuré