Arcane  v3.16.0.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
CartesianPatch.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/* CartesianPatch.h (C) 2000-2025 */
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/*---------------------------------------------------------------------------*/
29/*!
30 * \ingroup ArcaneCartesianMesh
31 * \brief Patch AMR d'un maillage cartésien.
32 */
33class ARCANE_CARTESIANMESH_EXPORT CartesianPatch
34{
35 public:
36
37 //! Patch nul.
38 CartesianPatch() = default;
39
40 //! Patch nul.
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
54 //! Groupe de mailles du patch
55 CellGroup cells();
56
57 Integer index() const
58 {
59 ARCANE_CHECK_POINTER(m_patch);
60 return m_patch->index();
61 }
62 Integer level() const
63 {
64 ARCANE_CHECK_POINTER(m_patch);
65 return m_patch->level();
66 }
67
68 //! Liste des mailles dans la direction \a dir
70 {
71 ARCANE_CHECK_POINTER(m_patch);
72 return m_patch->cellDirection(dir);
73 }
74
75 //! Liste des mailles dans la direction \a dir (0, 1 ou 2)
77 {
78 ARCANE_CHECK_POINTER(m_patch);
79 return m_patch->cellDirection(idir);
80 }
81
82 //! Liste des faces dans la direction \a dir
84 {
85 ARCANE_CHECK_POINTER(m_patch);
86 return m_patch->faceDirection(dir);
87 }
88
89 //! Liste des faces dans la direction \a dir (0, 1 ou 2)
91 {
92 ARCANE_CHECK_POINTER(m_patch);
93 return m_patch->faceDirection(idir);
94 }
95
96 //! Liste des noeuds dans la direction \a dir
98 {
99 ARCANE_CHECK_POINTER(m_patch);
100 return m_patch->nodeDirection(dir);
101 }
102
103 //! Liste des noeuds dans la direction \a dir (0, 1 ou 2)
105 {
106 ARCANE_CHECK_POINTER(m_patch);
107 return m_patch->nodeDirection(idir);
108 }
109
110 //! Effectue des vérifications sur la validité de l'instance.
111 void checkValid() const
112 {
113 ARCANE_CHECK_POINTER(m_patch);
114 m_patch->checkValid();
115 }
116
117 //! Indique si le patch est nul.
118 bool isNull() const { return !m_patch; }
119
120 //! Interface associée au patch (pour compatibilité avec l'existant)
121 ICartesianMeshPatch* patchInterface() const { return m_patch; }
122
123 private:
124
125 ICartesianMeshPatch* m_patch = nullptr;
126};
127
128/*---------------------------------------------------------------------------*/
129/*---------------------------------------------------------------------------*/
130
131} // End namespace Arcane
132
133/*---------------------------------------------------------------------------*/
134/*---------------------------------------------------------------------------*/
135
136#endif
137
#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.
Patch AMR d'un maillage cartésien.
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.
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.
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é.
-*- 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é