15#include "CartesianMeshNumberingMng.h"
17#include "arcane/core/IMesh.h"
18#include "arcane/core/IParallelMng.h"
19#include "arcane/core/VariableTypes.h"
20#include "arcane/core/ICartesianMeshGenerationInfo.h"
31CartesianMeshNumberingMng::
32CartesianMeshNumberingMng(IMesh* mesh)
33: TraceAccessor(mesh->traceMng())
35, m_dimension(mesh->dimension())
39, m_converting_numbering_face(true)
42 auto* m_generation_info = ICartesianMeshGenerationInfo::getReference(m_mesh,
true);
45 m_nb_cell.x = global_nb_cells_by_direction[
MD_DirX];
46 m_nb_cell.y = global_nb_cells_by_direction[
MD_DirY];
47 m_nb_cell.z = ((m_dimension == 2) ? 1 : global_nb_cells_by_direction[
MD_DirZ]);
50 ARCANE_FATAL(
"Bad value '{0}' for globalNbCells()[MD_DirX] (should be >0)", m_nb_cell.x);
52 ARCANE_FATAL(
"Bad value '{0}' for globalNbCells()[MD_DirY] (should be >0)", m_nb_cell.y);
54 ARCANE_FATAL(
"Bad value '{0}' for globalNbCells()[MD_DirZ] (should be >0)", m_nb_cell.z);
56 m_p_to_l_level.add(0);
58 if (m_dimension == 2) {
59 m_latest_cell_uid = m_nb_cell.x * m_nb_cell.y;
60 m_latest_node_uid = (m_nb_cell.x + 1) * (m_nb_cell.y + 1);
61 m_latest_face_uid = (m_nb_cell.x * m_nb_cell.y) * 2 + m_nb_cell.x * 2 + m_nb_cell.y;
64 m_latest_cell_uid = m_nb_cell.x * m_nb_cell.y * m_nb_cell.z;
65 m_latest_node_uid = (m_nb_cell.x + 1) * (m_nb_cell.y + 1) * (m_nb_cell.z + 1);
66 m_latest_face_uid = (m_nb_cell.z + 1) * m_nb_cell.x * m_nb_cell.y + (m_nb_cell.x + 1) * m_nb_cell.y * m_nb_cell.z + (m_nb_cell.y + 1) * m_nb_cell.z * m_nb_cell.x;
69 m_first_cell_uid_level.add(0);
70 m_first_node_uid_level.add(0);
71 m_first_face_uid_level.add(0);
75 if (m_converting_numbering_face) {
76 UniqueArray<Int64> face_uid(nbFaceByCell());
77 ENUMERATE_ (Cell, icell, m_mesh->allLevelCells(0)) {
78 cellFaceUniqueIds(face_uid, 0, icell->uniqueId());
79 for (Integer i = 0; i < nbFaceByCell(); ++i) {
80 m_face_ori_numbering_to_new[icell->face(i).uniqueId()] = face_uid[i];
81 m_face_new_numbering_to_ori[face_uid[i]] = icell->face(i).uniqueId();
91void CartesianMeshNumberingMng::
92prepareLevel(Int32 level)
96 if (level == m_max_level + 1) {
99 else if (level == m_min_level - 1) {
105 m_p_to_l_level.add(level);
107 m_first_cell_uid_level.add(m_latest_cell_uid);
108 m_first_node_uid_level.add(m_latest_node_uid);
109 m_first_face_uid_level.add(m_latest_face_uid);
111 m_latest_cell_uid += nbCellInLevel(level);
112 m_latest_node_uid += nbNodeInLevel(level);
113 m_latest_face_uid += nbFaceInLevel(level);
119void CartesianMeshNumberingMng::
132 for (Int32& i : m_p_to_l_level) {
141 auto*
cmgi = ICartesianMeshGenerationInfo::getReference(m_mesh,
false);
147 cmgi->setOwnCellOffsets(v[0] / m_pattern, v[1] / m_pattern, v[2] / m_pattern);
151 cmgi->setGlobalNbCells(v[0] / m_pattern, v[1] / m_pattern, v[2] / m_pattern);
155 cmgi->setOwnNbCells(v[0] / m_pattern, v[1] / m_pattern, v[2] / m_pattern);
157 cmgi->setFirstOwnCellUniqueId(firstCellUniqueId(0));
165Int64 CartesianMeshNumberingMng::
166firstCellUniqueId(Integer level)
168 auto pos = m_p_to_l_level.span().findFirst(level);
169 if (
pos.has_value()) {
170 return m_first_cell_uid_level[
pos.value()];
180Int64 CartesianMeshNumberingMng::
181firstNodeUniqueId(Integer level)
183 auto pos = m_p_to_l_level.span().findFirst(level);
184 if (
pos.has_value()) {
185 return m_first_node_uid_level[
pos.value()];
195Int64 CartesianMeshNumberingMng::
196firstFaceUniqueId(Integer level)
198 auto pos = m_p_to_l_level.span().findFirst(level);
199 if (
pos.has_value()) {
200 return m_first_face_uid_level[
pos.value()];
210Int64 CartesianMeshNumberingMng::
211globalNbCellsX(Integer level)
const
213 return static_cast<Int64
>(
static_cast<Real
>(m_nb_cell.x) * std::pow(m_pattern, level));
219Int64 CartesianMeshNumberingMng::
220globalNbCellsY(Integer level)
const
222 return static_cast<Int64
>(
static_cast<Real
>(m_nb_cell.y) * std::pow(m_pattern, level));
228Int64 CartesianMeshNumberingMng::
229globalNbCellsZ(Integer level)
const
231 return static_cast<Int64
>(
static_cast<Real
>(m_nb_cell.z) * std::pow(m_pattern, level));
237Int64 CartesianMeshNumberingMng::
238globalNbNodesX(Integer level)
const
240 return globalNbCellsX(level) + 1;
246Int64 CartesianMeshNumberingMng::
247globalNbNodesY(Integer level)
const
249 return globalNbCellsY(level) + 1;
255Int64 CartesianMeshNumberingMng::
256globalNbNodesZ(Integer level)
const
258 return globalNbCellsZ(level) + 1;
264Int64 CartesianMeshNumberingMng::
265globalNbFacesX(Integer level)
const
267 return globalNbCellsX(level) + 1;
273Int64 CartesianMeshNumberingMng::
274globalNbFacesY(Integer level)
const
276 return globalNbCellsY(level) + 1;
282Int64 CartesianMeshNumberingMng::
283globalNbFacesZ(Integer level)
const
285 return globalNbCellsZ(level) + 1;
291Int64 CartesianMeshNumberingMng::
292globalNbFacesXCartesianView(Integer level)
const
294 return (globalNbCellsX(level) * 2) + 1;
300Int64 CartesianMeshNumberingMng::
301globalNbFacesYCartesianView(Integer level)
const
303 return (globalNbCellsY(level) * 2) + 1;
309Int64 CartesianMeshNumberingMng::
310globalNbFacesZCartesianView(Integer level)
const
312 return (globalNbCellsZ(level) * 2) + 1;
318Int64 CartesianMeshNumberingMng::
319nbCellInLevel(Integer level)
const
321 if (m_dimension == 2) {
322 const Int64x2 nb_cell(globalNbCellsX(level), globalNbCellsY(level));
326 const Int64x3 nb_cell(globalNbCellsX(level), globalNbCellsY(level), globalNbCellsZ(level));
333Int64 CartesianMeshNumberingMng::
334nbNodeInLevel(Integer level)
const
336 if (m_dimension == 2) {
337 const Int64x2 nb_cell(globalNbCellsX(level), globalNbCellsY(level));
341 const Int64x3 nb_cell(globalNbCellsX(level), globalNbCellsY(level), globalNbCellsZ(level));
348Int64 CartesianMeshNumberingMng::
349nbFaceInLevel(Integer level)
const
351 if (m_dimension == 2) {
352 const Int64x2 nb_cell(globalNbCellsX(level), globalNbCellsY(level));
356 const Int64x3 nb_cell(globalNbCellsX(level), globalNbCellsY(level), globalNbCellsZ(level));
363Integer CartesianMeshNumberingMng::
372Int32 CartesianMeshNumberingMng::
373cellLevel(Int64 uid)
const
377 while (
pos < m_first_cell_uid_level.size() && m_first_cell_uid_level[
pos] <= uid) {
382 return m_p_to_l_level[
pos];
388Int32 CartesianMeshNumberingMng::
389nodeLevel(Int64 uid)
const
393 while (
pos < m_first_node_uid_level.size() && m_first_node_uid_level[
pos] <= uid) {
398 return m_p_to_l_level[
pos];
404Int32 CartesianMeshNumberingMng::
405faceLevel(Int64 uid)
const
409 while (
pos < m_first_face_uid_level.size() && m_first_face_uid_level[
pos] <= uid) {
414 return m_p_to_l_level[
pos];
421Int64 CartesianMeshNumberingMng::
439Int64 CartesianMeshNumberingMng::
467 if (
coord % 2 == 0) {
468 return coord * pattern;
471 return ((
coord - 1) * pattern) + 1;
476 if (
coord % 2 == 0) {
477 if (
coord % (pattern * 2) == 0) {
478 return coord / pattern;
493 return coord - ((Int64((
coord - 1) / (pattern * 2)) * (2 * (pattern - 1))) + ((
coord - 1) % (pattern * 2)));
501Int64 CartesianMeshNumberingMng::
502cellUniqueIdToCoordX(Int64 uid, Integer level)
504 const Int64
nb_cell_x = globalNbCellsX(level);
505 const Int64
nb_cell_y = globalNbCellsY(level);
517Int64 CartesianMeshNumberingMng::
518cellUniqueIdToCoordX(
Cell cell)
526Int64 CartesianMeshNumberingMng::
527cellUniqueIdToCoordY(Int64 uid, Integer level)
529 const Int64
nb_cell_x = globalNbCellsX(level);
530 const Int64
nb_cell_y = globalNbCellsY(level);
542Int64 CartesianMeshNumberingMng::
543cellUniqueIdToCoordY(
Cell cell)
551Int64 CartesianMeshNumberingMng::
552cellUniqueIdToCoordZ(Int64 uid, Integer level)
554 const Int64
nb_cell_x = globalNbCellsX(level);
555 const Int64
nb_cell_y = globalNbCellsY(level);
566Int64 CartesianMeshNumberingMng::
567cellUniqueIdToCoordZ(
Cell cell)
575Int64 CartesianMeshNumberingMng::
576nodeUniqueIdToCoordX(Int64 uid, Integer level)
578 const Int64
nb_node_x = globalNbNodesX(level);
579 const Int64
nb_node_y = globalNbNodesY(level);
591Int64 CartesianMeshNumberingMng::
592nodeUniqueIdToCoordX(
Node node)
595 return nodeUniqueIdToCoordX(uid, nodeLevel(uid));
601Int64 CartesianMeshNumberingMng::
602nodeUniqueIdToCoordY(Int64 uid, Integer level)
604 const Int64
nb_node_x = globalNbNodesX(level);
605 const Int64
nb_node_y = globalNbNodesY(level);
617Int64 CartesianMeshNumberingMng::
618nodeUniqueIdToCoordY(
Node node)
621 return nodeUniqueIdToCoordY(uid, nodeLevel(uid));
627Int64 CartesianMeshNumberingMng::
628nodeUniqueIdToCoordZ(Int64 uid, Integer level)
630 const Int64
nb_node_x = globalNbNodesX(level);
631 const Int64
nb_node_y = globalNbNodesY(level);
642Int64 CartesianMeshNumberingMng::
643nodeUniqueIdToCoordZ(
Node node)
646 return nodeUniqueIdToCoordZ(uid, nodeLevel(uid));
652Int64 CartesianMeshNumberingMng::
653faceUniqueIdToCoordX(Int64 uid, Integer level)
655 if (m_dimension == 2) {
657 const Int64
nb_face_x = globalNbFacesXCartesianView(level);
686 const Int64
nb_face_x = globalNbFacesX(level);
687 const Int64
nb_cell_x = globalNbCellsX(level);
770Int64 CartesianMeshNumberingMng::
771faceUniqueIdToCoordX(
Face face)
774 return faceUniqueIdToCoordX(uid, faceLevel(uid));
780Int64 CartesianMeshNumberingMng::
781faceUniqueIdToCoordY(Int64 uid, Integer level)
783 if (m_dimension == 2) {
784 const Int64
nb_face_x = globalNbFacesXCartesianView(level);
814 const Int64
nb_face_x = globalNbFacesX(level);
815 const Int64
nb_face_y = globalNbFacesY(level);
816 const Int64
nb_cell_x = globalNbCellsX(level);
817 const Int64
nb_cell_y = globalNbCellsY(level);
907Int64 CartesianMeshNumberingMng::
908faceUniqueIdToCoordY(
Face face)
911 return faceUniqueIdToCoordY(uid, faceLevel(uid));
917Int64 CartesianMeshNumberingMng::
918faceUniqueIdToCoordZ(Int64 uid, Integer level)
920 const Int64
nb_face_x = globalNbFacesX(level);
921 const Int64
nb_face_y = globalNbFacesY(level);
922 const Int64
nb_cell_x = globalNbCellsX(level);
923 const Int64
nb_cell_y = globalNbCellsY(level);
1009Int64 CartesianMeshNumberingMng::
1010faceUniqueIdToCoordZ(
Face face)
1013 return faceUniqueIdToCoordZ(uid, faceLevel(uid));
1019Int64 CartesianMeshNumberingMng::
1022 const Int64
nb_cell_x = globalNbCellsX(level);
1023 const Int64
nb_cell_y = globalNbCellsY(level);
1032Int64 CartesianMeshNumberingMng::
1035 const Int64
nb_cell_x = globalNbCellsX(level);
1044Int64 CartesianMeshNumberingMng::
1047 const Int64
nb_node_x = globalNbNodesX(level);
1048 const Int64
nb_node_y = globalNbNodesY(level);
1057Int64 CartesianMeshNumberingMng::
1060 const Int64
nb_node_x = globalNbNodesX(level);
1069Int64 CartesianMeshNumberingMng::
1072 const Int64
nb_face_x = globalNbFacesX(level);
1073 const Int64
nb_face_y = globalNbFacesY(level);
1074 const Int64
nb_cell_x = globalNbCellsX(level);
1075 const Int64
nb_cell_y = globalNbCellsY(level);
1078 Int64 uid = firstFaceUniqueId(level);
1156Int64 CartesianMeshNumberingMng::
1159 const Int64
nb_face_x = globalNbFacesXCartesianView(level);
1192Integer CartesianMeshNumberingMng::
1195 return static_cast<Integer
>(std::pow(m_pattern, m_mesh->dimension()));
1201void CartesianMeshNumberingMng::
1204 if (uid.size() != nbNodeByCell())
1207 const Int64
nb_node_x = globalNbNodesX(level);
1208 const Int64
nb_node_y = globalNbNodesY(level);
1225void CartesianMeshNumberingMng::
1228 if (uid.size() != nbNodeByCell())
1231 const Int64
nb_node_x = globalNbNodesX(level);
1243void CartesianMeshNumberingMng::
1246 if (m_dimension == 2) {
1247 const Int64x2 cell_coord(cellUniqueIdToCoordX(cell_uid, level), cellUniqueIdToCoordY(cell_uid, level));
1251 const Int64x3 cell_coord(cellUniqueIdToCoordX(cell_uid, level), cellUniqueIdToCoordY(cell_uid, level), cellUniqueIdToCoordZ(cell_uid, level));
1259Integer CartesianMeshNumberingMng::
1262 return m_pattern * m_dimension;
1268void CartesianMeshNumberingMng::
1271 if (uid.size() != nbFaceByCell())
1274 const Int64x3 nb_cell(globalNbCellsX(level), globalNbCellsY(level), globalNbCellsZ(level));
1331 uid[4] = uid[1] + 1;
1348void CartesianMeshNumberingMng::
1351 if (uid.size() != nbFaceByCell())
1354 const Int64
nb_cell_x = globalNbCellsX(level);
1383 uid[3] = uid[2] - 1;
1386 uid[1] = uid[2] + 1;
1397void CartesianMeshNumberingMng::
1400 if (m_dimension == 2) {
1401 const Int64x2 cell_coord(cellUniqueIdToCoordX(cell_uid, level), cellUniqueIdToCoordY(cell_uid, level));
1405 const Int64x3 cell_coord(cellUniqueIdToCoordX(cell_uid, level), cellUniqueIdToCoordY(cell_uid, level), cellUniqueIdToCoordZ(cell_uid, level));
1413void CartesianMeshNumberingMng::
1416 cellUniqueIdsAroundCell(uid, cell.
uniqueId(), cell.
level());
1422void CartesianMeshNumberingMng::
1427 const Int64
coord_cell_x = cellUniqueIdToCoordX(cell_uid, level);
1428 const Int64
coord_cell_y = cellUniqueIdToCoordY(cell_uid, level);
1430 const Int64
nb_cells_x = globalNbCellsX(level);
1431 const Int64
nb_cells_y = globalNbCellsY(level);
1433 if (m_dimension == 2) {
1434 ARCANE_ASSERT((uid.size() == 9), (
"Size of uid array != 9"));
1436 for (Integer
j = -1;
j < 2; ++
j) {
1440 for (Integer i = -1; i < 2; ++i) {
1451 ARCANE_ASSERT((uid.size() == 27), (
"Size of uid array != 27"));
1453 const Int64
coord_cell_z = cellUniqueIdToCoordZ(cell_uid, level);
1454 const Int64
nb_cells_z = globalNbCellsZ(level);
1456 for (Integer
k = -1;
k < 2; ++
k) {
1460 for (Integer
j = -1;
j < 2; ++
j) {
1464 for (Integer i = -1; i < 2; ++i) {
1480void CartesianMeshNumberingMng::
1483 if (!(
parent_cell.itemBase().flags() & ItemFlags::II_JustRefined)) {
1494 if (m_dimension == 2) {
1526 const Real x = (Real)
pos_x / (Real)m_pattern;
1527 const Real y = (Real)
pos_y / (Real)m_pattern;
1535 const Real
tx = (
j - i) * x + i;
1536 const Real
ty = (l -
k) * y +
k;
1553 return {
tx,
ty, 0 };
1559 for (Integer
j = 0;
j < m_pattern; ++
j) {
1560 for (Integer i = 0; i < m_pattern; ++i) {
1562 Integer begin = (i == 0 &&
j == 0 ? 0 :
j == 0 ? 1
1564 Integer end = (i == 0 ? nbNodeByCell() : nbNodeByCell() - 1);
1591 const Real x = (Real)
pos_x / (Real)m_pattern;
1592 const Real y = (Real)
pos_y / (Real)m_pattern;
1593 const Real z = (Real)
pos_z / (Real)m_pattern;
1602 const Real i = (
p.x - m.
x) * y + m.
x;
1603 const Real
j = (o.
x - n.
x) * y + n.
x;
1605 const Real
tx = (
j - i) * x + i;
1607 const Real
k = (n.
y - m.
y) * x + m.
y;
1608 const Real l = (o.
y -
p.y) * x +
p.y;
1610 const Real
ty = (l -
k) * y +
k;
1612 const Real
q = (
p.z - m.
z) * y + m.
z;
1613 const Real
r = (o.
z - n.
z) * y + n.
z;
1615 const Real s = (n.
z - m.
z) * x + m.
z;
1616 const Real
t = (o.
z -
p.z) * x +
p.z;
1618 const Real
tz = (((
r -
q) * x +
q) + ((
t - s) * y + s)) * 0.5;
1651 const Integer
node_1d_3d_x[] = { 0, 1, 1, 0, 0, 1, 1, 0 };
1652 const Integer
node_1d_3d_y[] = { 0, 0, 1, 1, 0, 0, 1, 1 };
1653 const Integer
node_1d_3d_z[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
1655 for (Integer
k = 0;
k < m_pattern; ++
k) {
1656 for (Integer
j = 0;
j < m_pattern; ++
j) {
1657 for (Integer i = 0; i < m_pattern; ++i) {
1661 Integer end = nbNodeByCell();
1683void CartesianMeshNumberingMng::
1686 if (!(
parent_cell.itemBase().flags() & ItemFlags::II_JustAdded)) {
1692 if (m_dimension == 2) {
1715Int64 CartesianMeshNumberingMng::
1716parentCellUniqueIdOfCell(Int64 uid, Integer level,
bool do_fatal)
1723 if (globalNbCellsX(level - 1) == 0) {
1727 return NULL_ITEM_UNIQUE_ID;
1730 if (m_dimension == 2) {
1731 return cellUniqueId(level - 1,
1732 Int64x2(offsetLevelToLevel(cellUniqueIdToCoordX(uid, level), level, level - 1),
1733 offsetLevelToLevel(cellUniqueIdToCoordY(uid, level), level, level - 1)));
1736 return cellUniqueId(level - 1,
1737 Int64x3(offsetLevelToLevel(cellUniqueIdToCoordX(uid, level), level, level - 1),
1738 offsetLevelToLevel(cellUniqueIdToCoordY(uid, level), level, level - 1),
1739 offsetLevelToLevel(cellUniqueIdToCoordZ(uid, level), level, level - 1)));
1746Int64 CartesianMeshNumberingMng::
1755Int64 CartesianMeshNumberingMng::
1763 const Int32 level = cell.
level();
1765 return cellUniqueId(level + 1,
1774Int64 CartesianMeshNumberingMng::
1781 const Int32 level = cell.
level();
1783 return cellUniqueId(level + 1,
1791Int64 CartesianMeshNumberingMng::
1794 if (m_dimension == 2) {
1797 return childCellUniqueIdOfCell(cell,
1807 return childCellUniqueIdOfCell(cell,
1870Int64 CartesianMeshNumberingMng::
1871parentNodeUniqueIdOfNode(Int64 uid, Integer level,
bool do_fatal)
1877 const Int64
coord_x = nodeUniqueIdToCoordX(uid, level);
1878 const Int64
coord_y = nodeUniqueIdToCoordY(uid, level);
1884 return NULL_ITEM_UNIQUE_ID;
1887 if (m_dimension == 2) {
1888 return nodeUniqueId(level - 1,
1890 offsetLevelToLevel(
coord_y, level, level - 1)));
1893 const Int64
coord_z = nodeUniqueIdToCoordZ(uid, level);
1895 if (
coord_z % m_pattern != 0) {
1899 return NULL_ITEM_UNIQUE_ID;
1901 return nodeUniqueId(level - 1,
1903 offsetLevelToLevel(
coord_y, level, level - 1),
1904 offsetLevelToLevel(
coord_z, level, level - 1)));
1911Int64 CartesianMeshNumberingMng::
1915 return parentNodeUniqueIdOfNode(uid, nodeLevel(uid),
do_fatal);
1921Int64 CartesianMeshNumberingMng::
1922childNodeUniqueIdOfNode(Int64 uid, Integer level)
1924 if (m_dimension == 2) {
1925 return nodeUniqueId(level + 1,
1926 Int64x2(offsetLevelToLevel(nodeUniqueIdToCoordX(uid, level), level, level + 1),
1927 offsetLevelToLevel(nodeUniqueIdToCoordY(uid, level), level, level + 1)));
1931 return nodeUniqueId(level + 1,
1932 Int64x3(offsetLevelToLevel(nodeUniqueIdToCoordX(uid, level), level, level + 1),
1933 offsetLevelToLevel(nodeUniqueIdToCoordY(uid, level), level, level + 1),
1934 offsetLevelToLevel(nodeUniqueIdToCoordZ(uid, level), level, level + 1)));
1941Int64 CartesianMeshNumberingMng::
1942childNodeUniqueIdOfNode(
Node node)
1945 return childNodeUniqueIdOfNode(uid, nodeLevel(uid));
1951Int64 CartesianMeshNumberingMng::
1952parentFaceUniqueIdOfFace(Int64 uid, Integer level,
bool do_fatal)
1954 if (m_converting_numbering_face && level == m_ori_level) {
1955 uid = m_face_ori_numbering_to_new[uid];
1963 const Int64
coord_x = faceUniqueIdToCoordX(uid, level);
1964 const Int64
coord_y = faceUniqueIdToCoordY(uid, level);
1966 ARCANE_ASSERT((
coord_x < globalNbFacesXCartesianView(level) &&
coord_x >= 0), (
"Bad coord_x"))
1967 ARCANE_ASSERT((
coord_y < globalNbFacesYCartesianView(level) &&
coord_y >= 0), (
"Bad coord_y"))
1976 return NULL_ITEM_UNIQUE_ID;
1982 if (m_dimension == 2) {
1983 if (m_converting_numbering_face && level - 1 == m_ori_level) {
1989 const Int64
coord_z = faceUniqueIdToCoordZ(uid, level);
1990 ARCANE_ASSERT((
coord_z < globalNbFacesZCartesianView(level) &&
coord_z >= 0), (
"Bad coord_z"))
1998 return NULL_ITEM_UNIQUE_ID;
2005 if (m_converting_numbering_face && level - 1 == m_ori_level) {
2016Int64 CartesianMeshNumberingMng::
2020 return parentFaceUniqueIdOfFace(uid, faceLevel(uid),
do_fatal);
2026Int64 CartesianMeshNumberingMng::
2029 if (m_converting_numbering_face && level == m_ori_level) {
2030 uid = m_face_ori_numbering_to_new[uid];
2033 const Int64
coord_x = faceUniqueIdToCoordX(uid, level);
2034 const Int64
coord_y = faceUniqueIdToCoordY(uid, level);
2036 ARCANE_ASSERT((
coord_x < globalNbFacesXCartesianView(level) &&
coord_x >= 0), (
"Bad coord_x"))
2037 ARCANE_ASSERT((
coord_y < globalNbFacesYCartesianView(level) &&
coord_y >= 0), (
"Bad coord_y"))
2045 if (m_dimension == 2) {
2058 if (m_converting_numbering_face && level + 1 == m_ori_level) {
2068 const Int64
coord_z = faceUniqueIdToCoordZ(uid, level);
2069 ARCANE_ASSERT((
coord_z < globalNbFacesZCartesianView(level) &&
coord_z >= 0), (
"Bad coord_z"))
2092 if (m_converting_numbering_face && level + 1 == m_ori_level) {
2103Int64 CartesianMeshNumberingMng::
2114face3DNumberingThreeParts(Integer level)
const
2116 const Int64x3 nb_cell(globalNbCellsX(level), globalNbCellsY(level), globalNbCellsZ(level));
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Int32 nbHChildren() const
Nombre d'enfants pour l'AMR.
Cell hChild(Int32 i) const
i-ème enfant AMR
Node node(Int32 i) const
i-ème noeud de l'entité
ItemUniqueId uniqueId() const
Identifiant unique sur tous les domaines.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Classe gérant un vecteur de réel de dimension 3.
Classe gérant un vecteur de dimension 2 de type T.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
Real y
deuxième composante du triplet
Real z
troisième composante du triplet
Real x
première composante du triplet