Arcane  v4.1.4.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
CartesianMeshPatch.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/* CartesianMeshPatch.h (C) 2000-2026 */
9/* */
10/* Informations sur un patch AMR d'un maillage cartésien. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CARTESIANMESH_CARTESIANMESHPATCH_H
13#define ARCANE_CARTESIANMESH_CARTESIANMESHPATCH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/cartesianmesh/internal/ICartesianMeshPatchInternal.h"
18#include "arcane/utils/TraceAccessor.h"
19
21#include "arcane/core/VariableTypes.h"
22
23#include "arcane/cartesianmesh/ICartesianMeshPatch.h"
24#include "arcane/cartesianmesh/CellDirectionMng.h"
25#include "arcane/cartesianmesh/FaceDirectionMng.h"
26#include "arcane/cartesianmesh/NodeDirectionMng.h"
27
28/*---------------------------------------------------------------------------*/
29/*---------------------------------------------------------------------------*/
30
31namespace Arcane
32{
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
44class CartesianMeshPatch
45: public TraceAccessor
47{
48 friend CartesianMeshImpl;
49
50 class Impl
52 {
53 public:
54
55 explicit Impl(CartesianMeshPatch* m_patch)
56 : m_patch(m_patch)
57 {}
58 AMRPatchPosition& positionRef() override
59 {
60 return m_patch->m_position;
61 }
62 void setPosition(const AMRPatchPosition& position) override
63 {
64 m_patch->m_position = position;
65 }
66
67 private:
68
69 CartesianMeshPatch* m_patch;
70 };
71
72 public:
73 CartesianMeshPatch(ICartesianMesh* cmesh,Integer patch_index);
74 CartesianMeshPatch(ICartesianMesh* cmesh, Integer patch_index, const AMRPatchPosition& position);
75 ~CartesianMeshPatch() override;
76 public:
77 CellGroup cells() override;
78 CellGroup inPatchCells() override;
79 CellGroup overlapCells() override;
80 Integer index() override
81 {
82 return m_amr_patch_index;
83 }
85 {
86 return m_cell_directions[dir];
87 }
88
90 {
91 return m_cell_directions[idir];
92 }
93
95 {
96 return m_face_directions[dir];
97 }
98
100 {
101 return m_face_directions[idir];
102 }
103
105 {
106 return m_node_directions[dir];
107 }
108
110 {
111 return m_node_directions[idir];
112 }
113 void checkValid() const override;
114
115 AMRPatchPosition position() const override
116 {
117 return m_position;
118 }
119
120 ICartesianMeshPatchInternal* _internalApi() override
121 {
122 return &m_impl;
123 }
124
125 private:
126
127 void _internalComputeNodeCellInformations(Cell cell0,Real3 cell0_coord,VariableNodeReal3& nodes_coord);
128 void _internalComputeNodeCellInformations();
129 void _computeNodeCellInformations2D(Cell cell0,Real3 cell0_coord,VariableNodeReal3& nodes_coord);
130 void _computeNodeCellInformations3D(Cell cell0,Real3 cell0_coord,VariableNodeReal3& nodes_coord);
131
132 private:
133
134 ICartesianMesh* m_mesh;
135 AMRPatchPosition m_position;
136 CellDirectionMng m_cell_directions[3];
137 FaceDirectionMng m_face_directions[3];
138 NodeDirectionMng m_node_directions[3];
139 Integer m_amr_patch_index;
140 Impl m_impl;
141};
142
143/*---------------------------------------------------------------------------*/
144/*---------------------------------------------------------------------------*/
145
146} // End namespace Arcane
147
148/*---------------------------------------------------------------------------*/
149/*---------------------------------------------------------------------------*/
150
151#endif
152
Déclarations de types sur les entités.
Classe permettant de définir la position d'un patch dans le maillage cartésien.
FaceDirectionMng & faceDirection(Integer idir) override
Liste des faces dans la direction dir (0, 1 ou 2)
Integer index() override
TODO.
FaceDirectionMng & faceDirection(eMeshDirection dir) override
Liste des faces dans la direction dir.
NodeDirectionMng & nodeDirection(Integer idir) override
Liste des noeuds dans la direction dir (0, 1 ou 2)
void checkValid() const override
Effectue des vérifications sur la validité de l'instance.
CellDirectionMng & cellDirection(eMeshDirection dir) override
Liste des mailles dans la direction dir.
NodeDirectionMng & nodeDirection(eMeshDirection dir) override
Liste des noeuds dans la direction dir.
CellGroup cells() override
Groupe de mailles du patch.
CellDirectionMng & cellDirection(Integer idir) override
Liste des mailles dans la direction dir (0, 1 ou 2)
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.
Interface d'un maillage cartésien.
Infos sur les noeuds d'une direction spécifique X,Y ou Z d'un maillage structuré.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
ItemGroupT< Cell > CellGroup
Groupe de mailles.
Definition ItemTypes.h:183
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Grandeur au noeud de type coordonnées.
-*- 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é
@ Cell
Le maillage est AMR par maille.
Definition MeshKind.h:52