12#ifndef ARCANE_CARTESIANMESH_FACEDIRECTIONMNG_H
13#define ARCANE_CARTESIANMESH_FACEDIRECTIONMNG_H
17#include "arcane/ArcaneTypes.h"
18#include "arcane/Item.h"
19#include "arcane/VariableTypedef.h"
20#include "arcane/ItemEnumerator.h"
22#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
23#include "arcane/cartesianmesh/CartesianItemDirectionInfo.h"
40class ARCANE_CARTESIANMESH_EXPORT DirFace
42 friend FaceDirectionMng;
46 DirFace(
Cell n,
Cell p) : m_previous(p), m_next(n){}
57 CellLocalId
nextCellId()
const {
return m_next.itemLocalId(); }
74class ARCANE_CARTESIANMESH_EXPORT DirFaceLocalId
76 friend FaceDirectionMng;
80 ARCCORE_HOST_DEVICE DirFaceLocalId(CellLocalId n, CellLocalId p)
88 ARCCORE_HOST_DEVICE CellLocalId
previousCell()
const {
return m_previous; }
90 ARCCORE_HOST_DEVICE CellLocalId
previousCellId()
const {
return m_previous; }
92 ARCCORE_HOST_DEVICE CellLocalId
nextCell()
const {
return m_next; }
94 ARCCORE_HOST_DEVICE CellLocalId
nextCellId()
const {
return m_next; }
98 CellLocalId m_previous;
111 friend CartesianMeshImpl;
112 friend CartesianMeshPatch;
138 return _face(f.localId());
144 return _dirFaceId(f);
176 return _face(f.localId());
196 ItemDirectionInfo d = m_infos_view[local_id];
197 return DirFace(m_cells[d.m_next_lid], m_cells[d.m_previous_lid]);
201 ARCCORE_HOST_DEVICE DirFaceLocalId _dirFaceId(FaceLocalId local_id)
const
203 ItemDirectionInfo d = m_infos_view[local_id];
204 return DirFaceLocalId(CellLocalId(d.m_next_lid), CellLocalId(d.m_previous_lid));
215 void _internalComputeInfos(
const CellDirectionMng& cell_dm,
216 const VariableCellReal3& cells_center,
217 const VariableFaceReal3& faces_center);
223 void _internalInit(ICartesianMesh* cm, eMeshDirection dir, Integer patch_index);
229 void _internalDestroy();
236 void _internalResizeInfos(Int32 new_size);
240 SmallSpan<ItemDirectionInfo> m_infos_view;
241 CellInfoListView m_cells;
245 void _computeCellInfos(
const CellDirectionMng& cell_dm,
246 const VariableCellReal3& cells_center,
247 const VariableFaceReal3& faces_center);
248 bool _hasFace(Cell cell, Int32 face_local_id)
const;
Infos sur maille avant et après une face suivant une direction.
__host__ __device__ CellLocalId previousCellId() const
Maille avant.
__host__ __device__ CellLocalId nextCell() const
Maille après.
__host__ __device__ CellLocalId previousCell() const
Maille avant.
__host__ __device__ CellLocalId nextCellId() const
Maille après.
Infos sur maille avant et après une face suivant une direction.
CellLocalId previousCellId() const
Maille avant.
Cell nextCell() const
Maille après.
Cell previousCell() const
Maille avant.
CellLocalId nextCellId() const
Maille après.
DirFace face(Face f) const
Face direction correspondant à la face f.
__host__ __device__ DirFaceLocalId dirFaceId(FaceLocalId f) const
Face direction correspondant à la face f.
DirFace operator[](FaceLocalId f) const
Face direction correspondant à la face f.
FaceDirectionMng()
Créé une instance vide.
DirFace face(FaceLocalId f) const
Face direction correspondant à la face f.
DirFace operator[](Face f) const
Face direction correspondant à la face f.
DirFace operator[](FaceEnumerator iface) const
Face direction correspondant à l'itérateur de la face iface.
eMeshDirection direction() const
Valeur de la direction.
constexpr Int32 localId() const
Identifiant local de l'entité dans le sous-domaine du processeur.
Structure interne contenant l'entité devant et derriére dans une direction.
ItemGroupT< Face > FaceGroup
Groupe de faces.
ItemEnumeratorT< Face > FaceEnumerator
Enumérateurs sur des faces.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
eMeshDirection
Type de la direction pour un maillage structuré
std::int32_t Int32
Type entier signé sur 32 bits.