Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
ICartesianMeshNumberingMngInternal.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/* ICartesianMeshNumberingMngInternal.h (C) 2000-2026 */
9/* */
10/* Interface for Cartesian mesh numbering manager. */
11/* In these managers, it is assumed that there is an interval of unique IDs */
12/* assigned to each mesh level. */
13/*---------------------------------------------------------------------------*/
14/*---------------------------------------------------------------------------*/
15
16#ifndef ARCANE_CARTESIANMESH_ICARTESIANMESHNUMBERINGMNGINTERNAL_H
17#define ARCANE_CARTESIANMESH_ICARTESIANMESHNUMBERINGMNGINTERNAL_H
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22#include "arcane/cartesianmesh/CartesianMeshGlobal.h"
23#include "arcane/core/Item.h"
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28namespace Arcane
29{
30
31/*---------------------------------------------------------------------------*/
32/*---------------------------------------------------------------------------*/
33
44class ARCANE_CARTESIANMESH_EXPORT ICartesianMeshNumberingMngInternal
45{
46 public:
47
48 virtual ~ICartesianMeshNumberingMngInternal() = default;
49
50 public:
51
52 virtual void build() = 0;
53 virtual void saveInfosInProperties() = 0;
54 virtual void recreateFromDump() = 0;
55
67
71 virtual void printStatus() = 0;
72
86 virtual void prepareLevel(Int32 level) = 0;
87
94 virtual void updateFirstLevel() = 0;
95
104 virtual Int64 firstCellUniqueId(Int32 level) const = 0;
105
114 virtual Int64 firstNodeUniqueId(Int32 level) const = 0;
115
124 virtual Int64 firstFaceUniqueId(Int32 level) const = 0;
125
132 virtual CartCoord globalNbCellsX(Int32 level) const = 0;
133
140 virtual CartCoord globalNbCellsY(Int32 level) const = 0;
141
148 virtual CartCoord globalNbCellsZ(Int32 level) const = 0;
149
156 virtual CartCoord globalNbNodesX(Int32 level) const = 0;
157
164 virtual CartCoord globalNbNodesY(Int32 level) const = 0;
165
172 virtual CartCoord globalNbNodesZ(Int32 level) const = 0;
173
192 virtual CartCoord globalNbFacesX(Int32 level) const = 0;
193
212 virtual CartCoord globalNbFacesY(Int32 level) const = 0;
213
231 virtual CartCoord globalNbFacesZ(Int32 level) const = 0;
232
282
293
304
311 virtual Int64 nbCellInLevel(Int32 level) const = 0;
312
319 virtual Int64 nbNodeInLevel(Int32 level) const = 0;
320
327 virtual Int64 nbFaceInLevel(Int32 level) const = 0;
328
335 virtual Int32 pattern() const = 0;
336
343 virtual Int32 cellLevel(Int64 uid) const = 0;
344
351 virtual Int32 nodeLevel(Int64 uid) const = 0;
352
359 virtual Int32 faceLevel(Int64 uid) const = 0;
360
374 virtual CartCoord offsetLevelToLevel(CartCoord coord, Int32 level_from, Int32 level_to) const = 0;
375
389 virtual CartCoord3 offsetLevelToLevel(CartCoord3 coord, Int32 level_from, Int32 level_to) const = 0;
390
403 virtual CartCoord faceOffsetLevelToLevel(CartCoord coord, Int32 level_from, Int32 level_to) const = 0;
404
412 virtual CartCoord3 cellUniqueIdToCoord(Int64 uid, Int32 level) = 0;
413
421
429 virtual CartCoord cellUniqueIdToCoordX(Int64 uid, Int32 level) = 0;
430
438
446 virtual CartCoord cellUniqueIdToCoordY(Int64 uid, Int32 level) = 0;
447
455
463 virtual CartCoord cellUniqueIdToCoordZ(Int64 uid, Int32 level) = 0;
464
472
480 virtual CartCoord nodeUniqueIdToCoordX(Int64 uid, Int32 level) = 0;
481
489
497 virtual CartCoord nodeUniqueIdToCoordY(Int64 uid, Int32 level) = 0;
498
506
514 virtual CartCoord nodeUniqueIdToCoordZ(Int64 uid, Int32 level) = 0;
515
523
534 virtual CartCoord faceUniqueIdToCoordX(Int64 uid, Int32 level) = 0;
535
546
557 virtual CartCoord faceUniqueIdToCoordY(Int64 uid, Int32 level) = 0;
558
569
580 virtual CartCoord faceUniqueIdToCoordZ(Int64 uid, Int32 level) = 0;
581
592
600 virtual Int64 cellUniqueId(CartCoord3 cell_coord, Int32 level) = 0;
601
609 virtual Int64 cellUniqueId(CartCoord2 cell_coord, Int32 level) = 0;
610
618 virtual Int64 nodeUniqueId(CartCoord3 node_coord, Int32 level) = 0;
619
627 virtual Int64 nodeUniqueId(CartCoord2 node_coord, Int32 level) = 0;
628
639 virtual Int64 faceUniqueId(CartCoord3 face_coord, Int32 level) = 0;
640
651 virtual Int64 faceUniqueId(CartCoord2 face_coord, Int32 level) = 0;
652
658 virtual Int32 nbNodeByCell() = 0;
659
675 virtual void cellNodeUniqueIds(CartCoord3 cell_coord, Int32 level, ArrayView<Int64> uid) = 0;
676
692 virtual void cellNodeUniqueIds(CartCoord2 cell_coord, Int32 level, ArrayView<Int64> uid) = 0;
693
709 virtual void cellNodeUniqueIds(Int64 cell_uid, Int32 level, ArrayView<Int64> uid) = 0;
710
724 virtual void cellNodeUniqueIds(Cell cell, ArrayView<Int64> uid) = 0;
725
731 virtual Int32 nbFaceByCell() = 0;
732
747 virtual void cellFaceUniqueIds(CartCoord3 cell_coord, Int32 level, ArrayView<Int64> uid) = 0;
748
763 virtual void cellFaceUniqueIds(CartCoord2 cell_coord, Int32 level, ArrayView<Int64> uid) = 0;
764
779 virtual void cellFaceUniqueIds(Int64 cell_uid, Int32 level, ArrayView<Int64> uid) = 0;
780
794 virtual void cellFaceUniqueIds(Cell cell, ArrayView<Int64> uid) = 0;
795
808 virtual void cellUniqueIdsAroundCell(CartCoord3 cell_coord, Int32 level, ArrayView<Int64> uid) = 0;
809
822 virtual void cellUniqueIdsAroundCell(CartCoord2 cell_coord, Int32 level, ArrayView<Int64> uid) = 0;
823
836 virtual void cellUniqueIdsAroundCell(Int64 cell_uid, Int32 level, ArrayView<Int64> uid) = 0;
837
849 virtual void cellUniqueIdsAroundCell(Cell cell, ArrayView<Int64> uid) = 0;
850
863 virtual void cellUniqueIdsAroundNode(CartCoord3 node_coord, Int32 level, ArrayView<Int64> uid) = 0;
864
877 virtual void cellUniqueIdsAroundNode(CartCoord2 node_coord, Int32 level, ArrayView<Int64> uid) = 0;
878
891 virtual void cellUniqueIdsAroundNode(Int64 node_uid, Int32 level, ArrayView<Int64> uid) = 0;
892
904 virtual void cellUniqueIdsAroundNode(Node node, ArrayView<Int64> uid) = 0;
905
912 virtual void setChildNodeCoordinates(Cell parent_cell) = 0;
913
920 virtual void setParentNodeCoordinates(Cell parent_cell) = 0;
921
931 virtual Int64 parentCellUniqueIdOfCell(Int64 uid, Int32 level, bool do_fatal = true) = 0;
932
941 virtual Int64 parentCellUniqueIdOfCell(Cell cell, bool do_fatal = true) = 0;
942
950 virtual Int64 childCellUniqueIdOfCell(Cell cell, CartCoord3 child_coord_in_parent) = 0;
951
959 virtual Int64 childCellUniqueIdOfCell(Cell cell, CartCoord2 child_coord_in_parent) = 0;
960
968 virtual Int64 childCellUniqueIdOfCell(Cell cell, Int32 child_index_in_parent) = 0;
969
977 virtual Cell childCellOfCell(Cell cell, CartCoord3 child_coord_in_parent) = 0;
978
986 virtual Cell childCellOfCell(Cell cell, CartCoord2 child_coord_in_parent) = 0;
987
997 virtual Int64 parentNodeUniqueIdOfNode(Int64 uid, Int32 level, bool do_fatal = true) = 0;
998
1007 virtual Int64 parentNodeUniqueIdOfNode(Node node, bool do_fatal = true) = 0;
1008
1016 virtual Int64 childNodeUniqueIdOfNode(Int64 uid, Int32 level) = 0;
1017
1025
1035 virtual Int64 parentFaceUniqueIdOfFace(Int64 uid, Int32 level, bool do_fatal = true) = 0;
1036
1045 virtual Int64 parentFaceUniqueIdOfFace(Face face, bool do_fatal = true) = 0;
1046
1055 virtual Int64 childFaceUniqueIdOfFace(Int64 uid, Int32 level, Int32 child_index_in_parent) = 0;
1056
1064 virtual Int64 childFaceUniqueIdOfFace(Face face, Int32 child_index_in_parent) = 0;
1065};
1066
1067/*---------------------------------------------------------------------------*/
1068/*---------------------------------------------------------------------------*/
1069
1070} // End namespace Arcane
1071
1072/*---------------------------------------------------------------------------*/
1073/*---------------------------------------------------------------------------*/
1074
1075#endif
Modifiable view of an array of type T.
Cell of a mesh.
Definition Item.h:1300
Face of a cell.
Definition Item.h:1032
Interface for Cartesian mesh numbering manager.
virtual Int64 parentNodeUniqueIdOfNode(Node node, bool do_fatal=true)=0
Method to retrieve the uniqueId of a node's parent.
virtual Int64 childNodeUniqueIdOfNode(Node node)=0
Method to retrieve the uniqueId of a child node of a parent node.
virtual Int32 faceLevel(Int64 uid) const =0
Method allowing the retrieval of the level of a face with its UID.
virtual Cell childCellOfCell(Cell cell, CartCoord2 child_coord_in_parent)=0
Method to retrieve a child cell of a parent cell based on the position of the child cell within the p...
virtual void cellUniqueIdsAroundNode(Node node, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around the node passed as a parameter.
virtual CartCoord cellUniqueIdToCoordX(Cell cell)=0
Method to retrieve the X coordinate of a cell.
virtual Int64 firstCellUniqueId(Int32 level) const =0
Method allowing the retrieval of the first unique ID used by the cells of a level....
virtual void cellNodeUniqueIds(CartCoord2 cell_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of the nodes of a cell from its coordinates.
virtual CartCoord3 cellUniqueIdToCoord(Int64 uid, Int32 level)=0
Method to retrieve the coordinates of a cell using its uniqueId.
virtual Int64 childCellUniqueIdOfCell(Cell cell, CartCoord3 child_coord_in_parent)=0
Method to retrieve the uniqueId of a child cell of a parent cell based on the position of the child c...
virtual Int64 nodeUniqueId(CartCoord2 node_coord, Int32 level)=0
Method to retrieve the uniqueId of a node from its position and level.
virtual Int64 firstNodeUniqueId(Int32 level) const =0
Method allowing the retrieval of the first unique ID used by the nodes of a level....
virtual CartCoord cellUniqueIdToCoordY(Cell cell)=0
Method to retrieve the Y coordinate of a cell.
virtual CartCoord nodeUniqueIdToCoordZ(Int64 uid, Int32 level)=0
Method to retrieve the Z coordinate of a node using its uniqueId.
virtual CartCoord globalNbFacesX(Int32 level) const =0
Method allowing the retrieval of the global number of faces in X for a level.
virtual CartCoord globalNbFacesXCartesianView(Int32 level) const =0
Method allowing the retrieval of the size of the "Cartesian grid" view containing the faces.
virtual Int64 nbFaceInLevel(Int32 level) const =0
Method allowing the retrieval of the total number of faces in a level.
virtual Int64 cellUniqueId(CartCoord2 cell_coord, Int32 level)=0
Method to retrieve the uniqueId of a cell from its position and level.
virtual Cell childCellOfCell(Cell cell, CartCoord3 child_coord_in_parent)=0
Method to retrieve a child cell of a parent cell based on the position of the child cell within the p...
virtual CartCoord globalNbCellsZ(Int32 level) const =0
Method allowing the retrieval of the global number of cells in Z for a level.
virtual Int32 nodeLevel(Int64 uid) const =0
Method allowing the retrieval of the level of a node with its UID.
virtual void cellNodeUniqueIds(CartCoord3 cell_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of the nodes of a cell from its coordinates.
virtual void cellUniqueIdsAroundNode(Int64 node_uid, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around the node passed as a parameter.
virtual CartCoord nodeUniqueIdToCoordX(Int64 uid, Int32 level)=0
Method to retrieve the X coordinate of a node using its uniqueId.
virtual CartCoord faceOffsetLevelToLevel(CartCoord coord, Int32 level_from, Int32 level_to) const =0
Method to obtain the position of the first child face from the position of the parent face.
virtual Int64 parentFaceUniqueIdOfFace(Face face, bool do_fatal=true)=0
Method to retrieve the uniqueId of a face's parent.
virtual void printStatus()=0
Method allowing the description of the object's state.
virtual Int64 childNodeUniqueIdOfNode(Int64 uid, Int32 level)=0
Method to retrieve the uniqueId of a child node of a parent node.
virtual Int64 parentFaceUniqueIdOfFace(Int64 uid, Int32 level, bool do_fatal=true)=0
Method to retrieve the uniqueId of a face's parent.
virtual CartCoord globalNbFacesYCartesianView(Int32 level) const =0
Method allowing the retrieval of the size of the "Cartesian grid" view containing the faces.
virtual CartCoord globalNbFacesY(Int32 level) const =0
Method allowing the retrieval of the global number of faces in Y for a level.
virtual void cellUniqueIdsAroundCell(CartCoord2 cell_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around a cell.
virtual void cellFaceUniqueIds(Int64 cell_uid, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of a cell's faces based on its uniqueId.
virtual CartCoord faceUniqueIdToCoordX(Face face)=0
Method to retrieve the X coordinate of a face.
virtual Int64 faceUniqueId(CartCoord2 face_coord, Int32 level)=0
Method to retrieve the uniqueId of a face from its position and level.
virtual Int64 parentCellUniqueIdOfCell(Cell cell, bool do_fatal=true)=0
Method to retrieve the uniqueId of a cell's parent.
virtual void prepareLevel(Int32 level)=0
Method allowing the preparation of a new level.
virtual CartCoord offsetLevelToLevel(CartCoord coord, Int32 level_from, Int32 level_to) const =0
Method allowing the retrieval of the position of the first child node/cell from the position of the p...
virtual Int32 nbNodeByCell()=0
Method to retrieve the number of nodes in a cell.
virtual Int64 childFaceUniqueIdOfFace(Int64 uid, Int32 level, Int32 child_index_in_parent)=0
Method to retrieve the uniqueId of a child face of a parent face based on the index of the child face...
virtual CartCoord3 offsetLevelToLevel(CartCoord3 coord, Int32 level_from, Int32 level_to) const =0
Method to obtain the position of the first child node/cell from the position of the parent node/cell.
virtual Int64 firstFaceUniqueId(Int32 level) const =0
Method allowing the retrieval of the first unique ID used by the faces of a level....
virtual Int64 childCellUniqueIdOfCell(Cell cell, CartCoord2 child_coord_in_parent)=0
Method to retrieve the uniqueId of a child cell of a parent cell based on the position of the child c...
virtual CartCoord globalNbCellsY(Int32 level) const =0
Method allowing the retrieval of the global number of cells in Y for a level.
virtual void cellUniqueIdsAroundNode(CartCoord2 node_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around a node.
virtual CartCoord nodeUniqueIdToCoordY(Node node)=0
Method to retrieve the Y coordinate of a node.
virtual CartCoord cellUniqueIdToCoordZ(Cell cell)=0
Method to retrieve the Z coordinate of a cell.
virtual Int64 nbNodeInLevel(Int32 level) const =0
Method allowing the retrieval of the total number of nodes in a level.
virtual Int64 childCellUniqueIdOfCell(Cell cell, Int32 child_index_in_parent)=0
Method to retrieve the uniqueId of a child cell of a parent cell based on the index of the child cell...
virtual Int64 faceUniqueId(CartCoord3 face_coord, Int32 level)=0
Method to retrieve the uniqueId of a face from its position and level.
virtual CartCoord globalNbFacesZ(Int32 level) const =0
Method allowing the retrieval of the global number of faces in Z for a level.
virtual CartCoord nodeUniqueIdToCoordY(Int64 uid, Int32 level)=0
Method to retrieve the Y coordinate of a node using its uniqueId.
virtual CartCoord faceUniqueIdToCoordZ(Int64 uid, Int32 level)=0
Method to retrieve the Z coordinate of a face using its uniqueId.
virtual CartCoord cellUniqueIdToCoordY(Int64 uid, Int32 level)=0
Method to retrieve the Y coordinate of a cell using its uniqueId.
virtual void cellUniqueIdsAroundNode(CartCoord3 node_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around a node.
virtual void cellUniqueIdsAroundCell(CartCoord3 cell_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around a cell.
virtual Int32 cellLevel(Int64 uid) const =0
Method allowing the retrieval of the level of a cell with its UID.
virtual Int32 nbFaceByCell()=0
Method to retrieve the number of faces in a cell.
virtual void cellUniqueIdsAroundCell(Int64 cell_uid, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around the cell passed as a parameter.
virtual CartCoord cellUniqueIdToCoordZ(Int64 uid, Int32 level)=0
Method to retrieve the Z coordinate of a cell using its uniqueId.
virtual Int64 parentCellUniqueIdOfCell(Int64 uid, Int32 level, bool do_fatal=true)=0
Method to retrieve the uniqueId of a cell's parent.
virtual Int64 nodeUniqueId(CartCoord3 node_coord, Int32 level)=0
Method to retrieve the uniqueId of a node from its position and level.
virtual void setParentNodeCoordinates(Cell parent_cell)=0
Method to define the spatial coordinates of the nodes of a parent cell. This method must be called af...
virtual CartCoord nodeUniqueIdToCoordZ(Node node)=0
Method to retrieve the Z coordinate of a node.
virtual void updateFirstLevel()=0
Method allowing the update of the first level.
virtual CartCoord faceUniqueIdToCoordZ(Face face)=0
Method to retrieve the Z coordinate of a face.
virtual Int32 pattern() const =0
Method allowing the retrieval of the refinement pattern used in each cell. For example,...
virtual void cellNodeUniqueIds(Int64 cell_uid, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of the nodes of a cell from its uniqueId.
virtual Int64 parentNodeUniqueIdOfNode(Int64 uid, Int32 level, bool do_fatal=true)=0
Method to retrieve the uniqueId of a node's parent.
virtual Int64 cellUniqueId(CartCoord3 cell_coord, Int32 level)=0
Method to retrieve the uniqueId of a cell from its position and level.
virtual CartCoord faceUniqueIdToCoordX(Int64 uid, Int32 level)=0
Method to retrieve the X coordinate of a face using its uniqueId.
virtual CartCoord nodeUniqueIdToCoordX(Node node)=0
Method to retrieve the X coordinate of a node.
virtual CartCoord globalNbNodesX(Int32 level) const =0
Method allowing the retrieval of the global number of nodes in X for a level.
virtual void cellNodeUniqueIds(Cell cell, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of the nodes of a cell.
virtual CartCoord globalNbNodesY(Int32 level) const =0
Method allowing the retrieval of the global number of nodes in Y for a level.
virtual void cellFaceUniqueIds(CartCoord2 cell_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of a cell's faces based on its coordinates.
virtual CartCoord globalNbNodesZ(Int32 level) const =0
Method allowing the retrieval of the global number of nodes in Z for a level.
virtual void cellUniqueIdsAroundCell(Cell cell, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of cells around the cell passed as a parameter.
virtual CartCoord faceUniqueIdToCoordY(Face face)=0
Method to retrieve the Y coordinate of a face.
virtual void cellFaceUniqueIds(Cell cell, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of a cell's faces.
virtual void setChildNodeCoordinates(Cell parent_cell)=0
Method to define the spatial coordinates of the nodes of child cells of a parent cell....
virtual void renumberingFacesLevel0FromOriginalArcaneNumbering()=0
Method allowing the renumbering of level 0 faces.
virtual CartCoord3 cellUniqueIdToCoord(Cell cell)=0
Method to retrieve the coordinates of a cell.
virtual CartCoord globalNbFacesZCartesianView(Int32 level) const =0
Method allowing the retrieval of the size of the "Cartesian grid" view containing the faces.
virtual void cellFaceUniqueIds(CartCoord3 cell_coord, Int32 level, ArrayView< Int64 > uid)=0
Method to retrieve the uniqueIds of a cell's faces based on its coordinates.
virtual CartCoord cellUniqueIdToCoordX(Int64 uid, Int32 level)=0
Method to retrieve the X coordinate of a cell using its uniqueId.
virtual Int64 nbCellInLevel(Int32 level) const =0
Method allowing the retrieval of the total number of cells in a level.
virtual Int64 childFaceUniqueIdOfFace(Face face, Int32 child_index_in_parent)=0
Method to retrieve the uniqueId of a child face of a parent face based on the index of the child face...
virtual CartCoord globalNbCellsX(Int32 level) const =0
Method allowing the retrieval of the global number of cells in X for a level.
virtual CartCoord faceUniqueIdToCoordY(Int64 uid, Int32 level)=0
Method to retrieve the Y coordinate of a face using its uniqueId.
Node of a mesh.
Definition Item.h:598
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 CartCoord
Represents a coordinate of an element in the Cartesian grid (in X or Y or Z).
std::int64_t Int64
Signed integer type of 64 bits.
Int32x2 CartCoord2
Represents the 2D coordinates of an element in the Cartesian grid {x, y}.
std::int32_t Int32
Signed integer type of 32 bits.
Int32x3 CartCoord3
Represents the 3D coordinates of an element in the Cartesian grid {x, y, z}.