Arcane  v4.1.1.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-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/* CartesianMeshPatch.h (C) 2000-2025 */
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 Integer index() override
80 {
81 return m_amr_patch_index;
82 }
84 {
85 return m_cell_directions[dir];
86 }
87
89 {
90 return m_cell_directions[idir];
91 }
92
94 {
95 return m_face_directions[dir];
96 }
97
99 {
100 return m_face_directions[idir];
101 }
102
104 {
105 return m_node_directions[dir];
106 }
107
109 {
110 return m_node_directions[idir];
111 }
112 void checkValid() const override;
113
114 AMRPatchPosition position() const override
115 {
116 return m_position;
117 }
118
119 ICartesianMeshPatchInternal* _internalApi() override
120 {
121 return &m_impl;
122 }
123
124 private:
125
126 void _internalComputeNodeCellInformations(Cell cell0,Real3 cell0_coord,VariableNodeReal3& nodes_coord);
127 void _internalComputeNodeCellInformations();
128 void _computeNodeCellInformations2D(Cell cell0,Real3 cell0_coord,VariableNodeReal3& nodes_coord);
129 void _computeNodeCellInformations3D(Cell cell0,Real3 cell0_coord,VariableNodeReal3& nodes_coord);
130
131 private:
132
133 ICartesianMesh* m_mesh;
134 AMRPatchPosition m_position;
135 CellDirectionMng m_cell_directions[3];
136 FaceDirectionMng m_face_directions[3];
137 NodeDirectionMng m_node_directions[3];
138 Integer m_amr_patch_index;
139 Impl m_impl;
140};
141
142/*---------------------------------------------------------------------------*/
143/*---------------------------------------------------------------------------*/
144
145} // End namespace Arcane
146
147/*---------------------------------------------------------------------------*/
148/*---------------------------------------------------------------------------*/
149
150#endif
151
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