17#include "arcane/cartesianmesh/internal/CartesianMeshNumberingMngInternal.h"
19#include "arcane/utils/Vector2.h"
20#include "arcane/utils/ITraceMng.h"
22#include "arcane/core/IMesh.h"
23#include "arcane/core/IParallelMng.h"
24#include "arcane/core/VariableTypes.h"
25#include "arcane/core/ICartesianMeshGenerationInfo.h"
26#include "arcane/core/IItemFamily.h"
27#include "arcane/core/IMeshModifier.h"
28#include "arcane/core/Properties.h"
39CartesianMeshNumberingMngInternal::
40CartesianMeshNumberingMngInternal(
IMesh*
mesh)
43, m_dimension(
mesh->dimension())
47, m_converting_numbering_face(true)
51 const auto* m_generation_info = ICartesianMeshGenerationInfo::getReference(m_mesh,
true);
52 ConstArrayView<Int64> global_nb_cells_by_direction = m_generation_info->globalNbCells();
54 const Int64x3 nb_cell_ground = {
55 global_nb_cells_by_direction[
MD_DirX],
56 global_nb_cells_by_direction[
MD_DirY],
57 ((m_dimension == 2) ? 1 : global_nb_cells_by_direction[
MD_DirZ])
60 m_nb_cell_ground.x =
static_cast<CartCoord>(nb_cell_ground.x);
61 m_nb_cell_ground.y =
static_cast<CartCoord>(nb_cell_ground.y);
62 m_nb_cell_ground.z =
static_cast<CartCoord>(nb_cell_ground.z);
64 if (nb_cell_ground.x <= 0)
65 ARCANE_FATAL(
"Bad value '{0}' for globalNbCells()[MD_DirX] (should be >0)", nb_cell_ground.x);
66 if (nb_cell_ground.y <= 0)
67 ARCANE_FATAL(
"Bad value '{0}' for globalNbCells()[MD_DirY] (should be >0)", nb_cell_ground.y);
68 if (nb_cell_ground.z <= 0)
69 ARCANE_FATAL(
"Bad value '{0}' for globalNbCells()[MD_DirZ] (should be >0)", nb_cell_ground.z);
71 if (m_dimension == 2) {
72 m_latest_cell_uid = nb_cell_ground.x * nb_cell_ground.y;
73 m_latest_node_uid = (nb_cell_ground.x + 1) * (nb_cell_ground.y + 1);
74 m_latest_face_uid = (nb_cell_ground.x * nb_cell_ground.y) * 2 + nb_cell_ground.x * 2 + nb_cell_ground.y;
77 m_latest_cell_uid = nb_cell_ground.x * nb_cell_ground.y * nb_cell_ground.z;
78 m_latest_node_uid = (nb_cell_ground.x + 1) * (nb_cell_ground.y + 1) * (nb_cell_ground.z + 1);
79 m_latest_face_uid = (nb_cell_ground.x + 1) * nb_cell_ground.y * nb_cell_ground.z + (nb_cell_ground.y + 1) * nb_cell_ground.z * nb_cell_ground.x + (nb_cell_ground.z + 1) * nb_cell_ground.x * nb_cell_ground.y;
83 m_first_cell_uid_level.add(0);
84 m_first_node_uid_level.add(0);
85 m_first_face_uid_level.add(0);
90 if (m_converting_numbering_face) {
91 UniqueArray<Int64> face_uid(CartesianMeshNumberingMngInternal::nbFaceByCell());
92 ENUMERATE_ (Cell, icell, m_mesh->allLevelCells(0)) {
93 CartesianMeshNumberingMngInternal::cellFaceUniqueIds(icell->uniqueId(), 0, face_uid);
94 for (Integer i = 0; i < CartesianMeshNumberingMngInternal::nbFaceByCell(); ++i) {
95 m_face_ori_numbering_to_new[icell->face(i).uniqueId()] = face_uid[i];
96 m_face_new_numbering_to_ori[face_uid[i]] = icell->face(i).uniqueId();
106void CartesianMeshNumberingMngInternal::
109 m_properties =
makeRef(
new Properties(*(m_mesh->properties()),
"CartesianMeshNumberingMngInternal"));
115void CartesianMeshNumberingMngInternal::
116saveInfosInProperties()
118 m_properties->set(
"Version", 1);
119 m_properties->set(
"FirstCellUIDByLevel", m_first_cell_uid_level);
122 m_properties->set(
"FirstNodeUIDByLevel", m_first_node_uid_level);
123 m_properties->set(
"FirstFaceUIDByLevel", m_first_face_uid_level);
125 m_properties->set(
"OriginalGroundLevelForConverting", m_ori_level);
131void CartesianMeshNumberingMngInternal::
134 Int32 v = m_properties->getInt32(
"Version");
136 ARCANE_FATAL(
"Bad numbering mng version: trying to read from incompatible checkpoint v={0} expected={1}", v, 1);
138 m_properties->get(
"FirstCellUIDByLevel", m_first_cell_uid_level);
139 m_properties->get(
"FirstNodeUIDByLevel", m_first_node_uid_level);
140 m_properties->get(
"FirstFaceUIDByLevel", m_first_face_uid_level);
142 m_properties->get(
"OriginalGroundLevelForConverting", m_ori_level);
143 if (m_ori_level == -1) {
144 m_converting_numbering_face =
false;
145 m_face_ori_numbering_to_new.clear();
146 m_face_new_numbering_to_ori.clear();
149 m_nb_cell_ground = { globalNbCellsX(0), globalNbCellsY(0), globalNbCellsZ(0) };
151 m_max_level = m_first_cell_uid_level.size() - 1;
157 for (
const Int64 elem : m_first_cell_uid_level) {
164 m_latest_cell_uid = m_first_cell_uid_level[pos] + nbCellInLevel(pos);
165 m_latest_node_uid = m_first_node_uid_level[pos] + nbNodeInLevel(pos);
166 m_latest_face_uid = m_first_face_uid_level[pos] + nbFaceInLevel(pos);
173void CartesianMeshNumberingMngInternal::
174renumberingFacesLevel0FromOriginalArcaneNumbering()
176 if (!m_converting_numbering_face)
179 info() <<
"Renumbering faces of level 0...";
186 icell->face(i).mutableItemBase().setUniqueId(face_uid[i]);
189 m_mesh->faceFamily()->notifyItemsUniqueIdChanged();
190 m_mesh->modifier()->endUpdate();
191 m_mesh->checkValidMesh();
193 m_converting_numbering_face =
false;
195 m_face_ori_numbering_to_new.clear();
196 m_face_new_numbering_to_ori.clear();
202void CartesianMeshNumberingMngInternal::
208 tm->
info() <<
"CartesianMeshNumberingMngInternal status :";
214 tm->
info() <<
"LatestCellUID : " << m_latest_cell_uid;
215 tm->
info() <<
"LatestNodeUID : " << m_latest_node_uid;
216 tm->
info() <<
"LatestFaceUID : " << m_latest_face_uid;
218 tm->
info() <<
"MinLevel : " << m_min_level;
219 tm->
info() <<
"MaxLevel : " << m_max_level;
221 tm->
info() <<
"GroundLevelNbCells : " << m_nb_cell_ground;
223 if (m_ori_level == -1) {
224 tm->
info() <<
"Ground Level is renumbered";
227 tm->
info() <<
"Ground Level is not renumbered -- OriginalGroundLevel : " << m_ori_level;
230 for (
Integer i = m_min_level; i <= m_max_level; ++i) {
231 tm->
info() <<
"Level " << i <<
" : ";
237 const auto* m_generation_info = ICartesianMeshGenerationInfo::getReference(m_mesh,
true);
240 tm->
info() <<
"global_nb_cells_by_direction.x : " << global_nb_cells_by_direction[
MD_DirX];
241 tm->
info() <<
"global_nb_cells_by_direction.y : " << global_nb_cells_by_direction[
MD_DirY];
242 tm->
info() <<
"global_nb_cells_by_direction.z : " << global_nb_cells_by_direction[
MD_DirZ];
248void CartesianMeshNumberingMngInternal::
249prepareLevel(
Int32 level)
251 if (level <= m_max_level && level >= m_min_level)
253 if (level == m_max_level + 1) {
255 m_first_cell_uid_level.add(m_latest_cell_uid);
256 m_first_node_uid_level.add(m_latest_node_uid);
257 m_first_face_uid_level.add(m_latest_face_uid);
259 else if (level == m_min_level - 1) {
261 _pushFront(m_first_cell_uid_level, m_latest_cell_uid);
262 _pushFront(m_first_node_uid_level, m_latest_node_uid);
263 _pushFront(m_first_face_uid_level, m_latest_face_uid);
277void CartesianMeshNumberingMngInternal::
280 const Int32 nb_levels_to_add = -m_min_level;
281 m_ori_level += nb_levels_to_add;
283 if (nb_levels_to_add == 0) {
287 m_max_level += nb_levels_to_add;
288 m_min_level += nb_levels_to_add;
290 const Integer to_div = m_pattern * nb_levels_to_add;
291 if (m_dimension == 2) {
292 m_nb_cell_ground.x /= to_div;
293 m_nb_cell_ground.y /= to_div;
297 m_nb_cell_ground /= to_div;
303 auto* cmgi = ICartesianMeshGenerationInfo::getReference(m_mesh,
false);
309 cmgi->setOwnCellOffsets(v[0] / to_div, v[1] / to_div, v[2] / to_div);
313 cmgi->setGlobalNbCells(v[0] / to_div, v[1] / to_div, v[2] / to_div);
317 cmgi->setOwnNbCells(v[0] / to_div, v[1] / to_div, v[2] / to_div);
327Int64 CartesianMeshNumberingMngInternal::
328firstCellUniqueId(
Int32 level)
const
330 return m_first_cell_uid_level[level - m_min_level];
336Int64 CartesianMeshNumberingMngInternal::
337firstNodeUniqueId(
Int32 level)
const
339 return m_first_node_uid_level[level - m_min_level];
345Int64 CartesianMeshNumberingMngInternal::
346firstFaceUniqueId(
Int32 level)
const
348 return m_first_face_uid_level[level - m_min_level];
355globalNbCellsX(
Int32 level)
const
357 return static_cast<CartCoord>(
static_cast<Real>(m_nb_cell_ground.x) * std::pow(m_pattern, level));
364globalNbCellsY(
Int32 level)
const
366 return static_cast<CartCoord>(
static_cast<Real>(m_nb_cell_ground.y) * std::pow(m_pattern, level));
373globalNbCellsZ(
Int32 level)
const
375 return static_cast<CartCoord>(
static_cast<Real>(m_nb_cell_ground.z) * std::pow(m_pattern, level));
382globalNbNodesX(
Int32 level)
const
391globalNbNodesY(
Int32 level)
const
400globalNbNodesZ(
Int32 level)
const
409globalNbFacesX(
Int32 level)
const
418globalNbFacesY(
Int32 level)
const
427globalNbFacesZ(
Int32 level)
const
436globalNbFacesXCartesianView(
Int32 level)
const
445globalNbFacesYCartesianView(
Int32 level)
const
454globalNbFacesZCartesianView(
Int32 level)
const
462Int64 CartesianMeshNumberingMngInternal::
463nbCellInLevel(
Int32 level)
const
465 if (m_dimension == 2) {
467 return nb_cell.x * nb_cell.y;
471 return nb_cell.x * nb_cell.y * nb_cell.z;
477Int64 CartesianMeshNumberingMngInternal::
478nbNodeInLevel(
Int32 level)
const
480 if (m_dimension == 2) {
482 return (nb_cell.x + 1) * (nb_cell.y + 1);
486 return (nb_cell.x + 1) * (nb_cell.y + 1) * (nb_cell.z + 1);
492Int64 CartesianMeshNumberingMngInternal::
493nbFaceInLevel(
Int32 level)
const
495 if (m_dimension == 2) {
497 return (nb_cell.x * nb_cell.y) * 2 + nb_cell.x * 2 + nb_cell.y;
501 return (nb_cell.x + 1) * nb_cell.y * nb_cell.z + (nb_cell.y + 1) * nb_cell.z * nb_cell.x + (nb_cell.z + 1) * nb_cell.x * nb_cell.y;
507Int32 CartesianMeshNumberingMngInternal::
516Int32 CartesianMeshNumberingMngInternal::
517cellLevel(
Int64 uid)
const
522 for (
Int32 i = m_min_level; i <= m_max_level; ++i) {
524 if (first_uid <= uid && first_uid > max) {
531 ARCANE_FATAL(
"CellUID is not in any patch (UID too low)");
534 ARCANE_FATAL(
"CellUID is not in any patch (UID too high)");
543Int32 CartesianMeshNumberingMngInternal::
544nodeLevel(
Int64 uid)
const
549 for (
Int32 i = m_min_level; i <= m_max_level; ++i) {
551 if (first_uid <= uid && first_uid > max) {
558 ARCANE_FATAL(
"NodeUID is not in any patch (UID too low)");
561 ARCANE_FATAL(
"NodeUID is not in any patch (UID too high)");
570Int32 CartesianMeshNumberingMngInternal::
571faceLevel(
Int64 uid)
const
576 for (
Int32 i = m_min_level; i <= m_max_level; ++i) {
578 if (first_uid <= uid && first_uid > max) {
585 ARCANE_FATAL(
"FaceUID is not in any patch (UID too low)");
588 ARCANE_FATAL(
"FaceUID is not in any patch (UID too high)");
601 if (level_from == level_to) {
604 if (level_from < level_to) {
605 return coord *
static_cast<CartCoord>(std::pow(m_pattern, (level_to - level_from)));
607 return coord /
static_cast<CartCoord>(std::pow(m_pattern, (level_from - level_to)));
616 if (level_from == level_to) {
619 if (level_from < level_to) {
620 return coord *
static_cast<CartCoord>(std::pow(m_pattern, (level_to - level_from)));
622 return coord /
static_cast<CartCoord>(std::pow(m_pattern, (level_from - level_to)));
652 if (level_from == level_to) {
656 if (level_from < level_to) {
657 const Int32 pattern = m_pattern * (level_to - level_from);
658 if (coord % 2 == 0) {
661 return ((coord - 1) *
pattern) + 1;
664 const Int32 pattern = m_pattern * (level_from - level_to);
665 if (coord % 2 == 0) {
666 if (coord % (
pattern * 2) == 0) {
680 return coord - (((coord - 1) / (
pattern * 2) * (2 * (
pattern - 1))) + ((coord - 1) % (
pattern * 2)));
693 uid -= first_cell_uid;
695 const Int64 to2d = uid % (nb_cell_x * nb_cell_y);
697 return {
static_cast<CartCoord>(to2d % nb_cell_x),
static_cast<CartCoord>(to2d / nb_cell_x),
static_cast<CartCoord>(uid / (nb_cell_x * nb_cell_y)) };
704cellUniqueIdToCoord(
Cell cell)
719 uid -= first_cell_uid;
721 const Int64 to2d = uid % (nb_cell_x * nb_cell_y);
722 return static_cast<CartCoord>(to2d % nb_cell_x);
729cellUniqueIdToCoordX(
Cell cell)
744 uid -= first_cell_uid;
746 const Int64 to2d = uid % (nb_cell_x * nb_cell_y);
747 return static_cast<CartCoord>(to2d / nb_cell_x);
754cellUniqueIdToCoordY(
Cell cell)
769 uid -= first_cell_uid;
771 return static_cast<CartCoord>(uid / (nb_cell_x * nb_cell_y));
778cellUniqueIdToCoordZ(
Cell cell)
793 uid -= first_node_uid;
795 const Int64 to2d = uid % (nb_node_x * nb_node_y);
796 return static_cast<CartCoord>(to2d % nb_node_x);
803nodeUniqueIdToCoordX(
Node node)
819 uid -= first_node_uid;
821 const Int64 to2d = uid % (nb_node_x * nb_node_y);
822 return static_cast<CartCoord>(to2d / nb_node_x);
829nodeUniqueIdToCoordY(
Node node)
845 uid -= first_node_uid;
847 return static_cast<CartCoord>(uid / (nb_node_x * nb_node_y));
854nodeUniqueIdToCoordZ(
Node node)
866 if (m_dimension == 2) {
871 uid -= first_face_uid;
894 return static_cast<CartCoord>(uid % nb_face_x);
903 uid -= first_face_uid;
930 if (uid < three_parts_numbering.x) {
940 return static_cast<CartCoord>((uid % nb_face_x) * 2);
946 if (uid < three_parts_numbering.x + three_parts_numbering.y) {
947 uid -= three_parts_numbering.x;
956 return static_cast<CartCoord>((uid % nb_cell_x) * 2 + 1);
962 uid -= three_parts_numbering.x + three_parts_numbering.y;
971 return static_cast<CartCoord>((uid % nb_cell_x) * 2 + 1);
978faceUniqueIdToCoordX(
Face face)
990 if (m_dimension == 2) {
994 uid -= first_face_uid;
1017 const Int64 flat_pos = uid / nb_face_x;
1018 return static_cast<CartCoord>((flat_pos * 2) + (flat_pos % 2 == uid % 2 ? 0 : 1) - 1);
1028 uid -= first_face_uid;
1055 if (uid < three_parts_numbering.x) {
1056 uid %= nb_face_x * nb_cell_y;
1067 return static_cast<CartCoord>((uid / nb_face_x) * 2 + 1);
1073 if (uid < three_parts_numbering.x + three_parts_numbering.y) {
1074 uid -= three_parts_numbering.x;
1075 uid %= nb_cell_x * nb_face_y;
1086 return static_cast<CartCoord>((uid / nb_cell_x) * 2);
1092 uid -= three_parts_numbering.x + three_parts_numbering.y;
1093 uid %= nb_cell_x * nb_cell_y;
1104 return static_cast<CartCoord>((uid / nb_cell_x) * 2 + 1);
1111faceUniqueIdToCoordY(
Face face)
1131 uid -= first_face_uid;
1158 if (uid < three_parts_numbering.x) {
1169 return static_cast<CartCoord>((uid / (nb_face_x * nb_cell_y)) * 2 + 1);
1175 if (uid < three_parts_numbering.x + three_parts_numbering.y) {
1176 uid -= three_parts_numbering.x;
1187 return static_cast<CartCoord>((uid / (nb_cell_x * nb_face_y)) * 2 + 1);
1193 uid -= three_parts_numbering.x + three_parts_numbering.y;
1204 return static_cast<CartCoord>((uid / (nb_cell_x * nb_cell_y)) * 2);
1211faceUniqueIdToCoordZ(
Face face)
1220Int64 CartesianMeshNumberingMngInternal::
1227 return (cell_coord.x + cell_coord.y * nb_cell_x + cell_coord.z * nb_cell_x * nb_cell_y) + first_cell_uid;
1233Int64 CartesianMeshNumberingMngInternal::
1239 return (cell_coord.x + cell_coord.y * nb_cell_x) + first_cell_uid;
1245Int64 CartesianMeshNumberingMngInternal::
1252 return (node_coord.x + node_coord.y * nb_node_x + node_coord.z * nb_node_x * nb_node_y) + first_node_uid;
1258Int64 CartesianMeshNumberingMngInternal::
1264 return (node_coord.x + node_coord.y * nb_node_x) + first_node_uid;
1270Int64 CartesianMeshNumberingMngInternal::
1306 if (face_coord.x % 2 == 0) {
1316 uid += face_coord.x + (face_coord.y * nb_face_x) + (face_coord.z * nb_face_x * nb_cell_y);
1320 else if (face_coord.y % 2 == 0) {
1321 uid += three_parts_numbering.x;
1331 uid += face_coord.x + (face_coord.y * nb_cell_x) + (face_coord.z * nb_cell_x * nb_face_y);
1335 else if (face_coord.z % 2 == 0) {
1336 uid += three_parts_numbering.x + three_parts_numbering.y;
1346 uid += face_coord.x + (face_coord.y * nb_cell_x) + (face_coord.z * nb_cell_x * nb_cell_y);
1349 ARCANE_FATAL(
"Bizarre -- x : {0} -- y : {1} -- z : {2}", face_coord.x, face_coord.y, face_coord.z);
1358Int64 CartesianMeshNumberingMngInternal::
1386 const Int64 a = (face_coord.y / 2) * nb_face_x;
1388 return (face_coord.x + a - 1) + first_face_uid;
1394Int32 CartesianMeshNumberingMngInternal::
1397 return (m_dimension == 2 ? 4 : 8);
1403void CartesianMeshNumberingMngInternal::
1413 const Int64 x0 = cell_coord.x + 0;
1414 const Int64 x1 = cell_coord.x + 1;
1416 const Int64 y0 = (cell_coord.y + 0) * nb_node_x;
1417 const Int64 y1 = (cell_coord.y + 1) * nb_node_x;
1419 const Int64 z0 = (cell_coord.z + 0) * nb_node_x * nb_node_y;
1420 const Int64 z1 = (cell_coord.z + 1) * nb_node_x * nb_node_y;
1422 uid[0] = x0 + y0 + z0 + first_node_uid;
1423 uid[1] = x1 + y0 + z0 + first_node_uid;
1424 uid[2] = x1 + y1 + z0 + first_node_uid;
1425 uid[3] = x0 + y1 + z0 + first_node_uid;
1427 uid[4] = x0 + y0 + z1 + first_node_uid;
1428 uid[5] = x1 + y0 + z1 + first_node_uid;
1429 uid[6] = x1 + y1 + z1 + first_node_uid;
1430 uid[7] = x0 + y1 + z1 + first_node_uid;
1436void CartesianMeshNumberingMngInternal::
1445 const Int64 x0 = cell_coord.x + 0;
1446 const Int64 x1 = cell_coord.x + 1;
1448 const Int64 y0 = (cell_coord.y + 0) * nb_node_x;
1449 const Int64 y1 = (cell_coord.y + 1) * nb_node_x;
1451 uid[0] = x0 + y0 + first_node_uid;
1452 uid[1] = x1 + y0 + first_node_uid;
1453 uid[2] = x1 + y1 + first_node_uid;
1454 uid[3] = x0 + y1 + first_node_uid;
1460void CartesianMeshNumberingMngInternal::
1463 if (m_dimension == 2) {
1476void CartesianMeshNumberingMngInternal::
1485Int32 CartesianMeshNumberingMngInternal::
1488 return (m_dimension == 2 ? 4 : 6);
1494void CartesianMeshNumberingMngInternal::
1501 const Int64x3 nb_face(nb_cell + 1);
1545 const Int64 total_face_yz = nb_face.x * nb_cell.y * nb_cell.z;
1546 const Int64 total_face_yz_zx = total_face_yz + nb_face.y * nb_cell.z * nb_cell.x;
1548 const Int64 nb_cell_before_j = cell_coord.y * nb_cell.x;
1550 uid[0] = (cell_coord.z * nb_cell.x * nb_cell.y) + nb_cell_before_j + cell_coord.x + total_face_yz_zx;
1552 uid[3] = uid[0] + nb_cell.x * nb_cell.y;
1554 uid[1] = (cell_coord.z * nb_face.x * nb_cell.y) + (cell_coord.y * nb_face.x) + cell_coord.x;
1556 uid[4] = uid[1] + 1;
1558 uid[2] = (cell_coord.z * nb_cell.x * nb_face.y) + nb_cell_before_j + cell_coord.x + total_face_yz;
1560 uid[5] = uid[2] + nb_cell.x;
1562 uid[0] += first_face_uid;
1563 uid[1] += first_face_uid;
1564 uid[2] += first_face_uid;
1565 uid[3] += first_face_uid;
1566 uid[4] += first_face_uid;
1567 uid[5] += first_face_uid;
1575void CartesianMeshNumberingMngInternal::
1582 const Int64 nb_face_x = nb_cell_x + 1;
1603 uid[0] = cell_coord.x * 2 + cell_coord.y * (nb_face_x + nb_cell_x);
1607 uid[2] = uid[0] + (nb_face_x + nb_cell_x);
1610 uid[3] = uid[2] - 1;
1613 uid[1] = uid[2] + 1;
1615 uid[0] += first_face_uid;
1616 uid[1] += first_face_uid;
1617 uid[2] += first_face_uid;
1618 uid[3] += first_face_uid;
1624void CartesianMeshNumberingMngInternal::
1627 if (m_dimension == 2) {
1640void CartesianMeshNumberingMngInternal::
1649void CartesianMeshNumberingMngInternal::
1652 ARCANE_ASSERT((uid.
size() == 27), (
"Size of uid array != 27"));
1661 const CartCoord coord_around_cell_z = cell_coord.z + k;
1662 if (coord_around_cell_z >= 0 && coord_around_cell_z < nb_cells_z) {
1664 const CartCoord coord_around_cell_y = cell_coord.y + j;
1666 if (coord_around_cell_y >= 0 && coord_around_cell_y < nb_cells_y) {
1668 const CartCoord coord_around_cell_x = cell_coord.x + i;
1670 if (coord_around_cell_x >= 0 && coord_around_cell_x < nb_cells_x) {
1671 uid[(i + 1) + ((j + 1) * 3) + ((k + 1) * 9)] =
cellUniqueId(
CartCoord3{ coord_around_cell_x, coord_around_cell_y, coord_around_cell_z }, level);
1683void CartesianMeshNumberingMngInternal::
1686 ARCANE_ASSERT((uid.
size() == 9), (
"Size of uid array != 9"));
1694 const CartCoord coord_around_cell_y = cell_coord.y + j;
1695 if (coord_around_cell_y >= 0 && coord_around_cell_y < nb_cells_y) {
1698 const CartCoord coord_around_cell_x = cell_coord.x + i;
1699 if (coord_around_cell_x >= 0 && coord_around_cell_x < nb_cells_x) {
1700 uid[(i + 1) + ((j + 1) * 3)] =
cellUniqueId(
CartCoord2{ coord_around_cell_x, coord_around_cell_y }, level);
1710void CartesianMeshNumberingMngInternal::
1713 if (m_dimension == 2) {
1726void CartesianMeshNumberingMngInternal::
1735void CartesianMeshNumberingMngInternal::
1738 ARCANE_ASSERT((uid.
size() == 8), (
"Size of uid array != 8"));
1747 const CartCoord coord_cell_z = node_coord.z + k;
1748 if (coord_cell_z >= 0 && coord_cell_z < nb_cells_z) {
1751 const CartCoord coord_cell_y = node_coord.y + j;
1752 if (coord_cell_y >= 0 && coord_cell_y < nb_cells_y) {
1755 const CartCoord coord_cell_x = node_coord.x + i;
1756 if (coord_cell_x >= 0 && coord_cell_x < nb_cells_x) {
1757 uid[(i + 1) + ((j + 1) * 2) + ((k + 1) * 4)] =
cellUniqueId(
CartCoord3{ coord_cell_x, coord_cell_y, coord_cell_z }, level);
1769void CartesianMeshNumberingMngInternal::
1772 ARCANE_ASSERT((uid.
size() == 4), (
"Size of uid array != 4"));
1780 const CartCoord coord_cell_y = node_coord.y + j;
1781 if (coord_cell_y >= 0 && coord_cell_y < nb_cells_y) {
1784 const CartCoord coord_cell_x = node_coord.x + i;
1785 if (coord_cell_x >= 0 && coord_cell_x < nb_cells_x) {
1796void CartesianMeshNumberingMngInternal::
1799 if (m_dimension == 2) {
1812void CartesianMeshNumberingMngInternal::
1821void CartesianMeshNumberingMngInternal::
1822setChildNodeCoordinates(
Cell parent_cell)
1830 const Real3& node0(nodes_coords[parent_cell.
node(0)]);
1831 const Real3& node1(nodes_coords[parent_cell.
node(1)]);
1832 const Real3& node2(nodes_coords[parent_cell.
node(2)]);
1833 const Real3& node3(nodes_coords[parent_cell.
node(3)]);
1835 if (m_dimension == 2) {
1867 const Real x =
static_cast<Real>(pos_x) /
static_cast<Real>(m_pattern);
1868 const Real y =
static_cast<Real>(pos_y) /
static_cast<Real>(m_pattern);
1870 const Real i = (node3.
x - node0.
x) * y + node0.
x;
1871 const Real j = (node2.
x - node1.
x) * y + node1.
x;
1873 const Real k = (node1.
y - node0.
y) * x + node0.
y;
1874 const Real l = (node2.
y - node3.
y) * x + node3.
y;
1876 const Real tx = (j - i) * x + i;
1877 const Real ty = (l - k) * y + k;
1894 return { tx, ty, 0 };
1897 constexpr CartCoord node_1d_2d_x[] = { 0, 1, 1, 0 };
1898 constexpr CartCoord node_1d_2d_y[] = { 0, 0, 1, 1 };
1900 for (
CartCoord j = 0; j < m_pattern; ++j) {
1901 for (
CartCoord i = 0; i < m_pattern; ++i) {
1903 Int32 begin = (i == 0 && j == 0 ? 0 : j == 0 ? 1
1908 for (
Int32 inode = begin; inode < end; ++inode) {
1909 nodes_coords[child.
node(inode)] = txty(i + node_1d_2d_x[inode], j + node_1d_2d_y[inode]);
1922 const Real3& node4(nodes_coords[parent_cell.
node(4)]);
1923 const Real3& node5(nodes_coords[parent_cell.
node(5)]);
1924 const Real3& node6(nodes_coords[parent_cell.
node(6)]);
1925 const Real3& node7(nodes_coords[parent_cell.
node(7)]);
1932 const Real x =
static_cast<Real>(pos_x) /
static_cast<Real>(m_pattern);
1933 const Real y =
static_cast<Real>(pos_y) /
static_cast<Real>(m_pattern);
1934 const Real z =
static_cast<Real>(pos_z) /
static_cast<Real>(m_pattern);
1937 const Real3 m = (node4 - node0) * z + node0;
1938 const Real3 n = (node5 - node1) * z + node1;
1939 const Real3 o = (node6 - node2) * z + node2;
1940 const Real3 p = (node7 - node3) * z + node3;
1943 const Real i = (p.
x - m.
x) * y + m.
x;
1944 const Real j = (o.
x - n.
x) * y + n.
x;
1946 const Real tx = (j - i) * x + i;
1948 const Real k = (n.
y - m.
y) * x + m.
y;
1949 const Real l = (o.
y - p.
y) * x + p.
y;
1951 const Real ty = (l - k) * y + k;
1953 const Real q = (p.
z - m.
z) * y + m.
z;
1954 const Real r = (o.
z - n.
z) * y + n.
z;
1956 const Real s = (n.
z - m.
z) * x + m.
z;
1957 const Real t = (o.
z - p.
z) * x + p.
z;
1959 const Real tz = (((r - q) * x + q) + ((t - s) * y + s)) * 0.5;
1989 return { tx, ty, tz };
1992 constexpr CartCoord node_1d_3d_x[] = { 0, 1, 1, 0, 0, 1, 1, 0 };
1993 constexpr CartCoord node_1d_3d_y[] = { 0, 0, 1, 1, 0, 0, 1, 1 };
1994 constexpr CartCoord node_1d_3d_z[] = { 0, 0, 0, 0, 1, 1, 1, 1 };
1996 for (
CartCoord k = 0; k < m_pattern; ++k) {
1997 for (
CartCoord j = 0; j < m_pattern; ++j) {
1998 for (
CartCoord i = 0; i < m_pattern; ++i) {
2005 for (
Int32 inode = begin; inode < end; ++inode) {
2006 nodes_coords[child.
node(inode)] = txtytz(i + node_1d_3d_x[inode], j + node_1d_3d_y[inode], k + node_1d_3d_z[inode]);
2024void CartesianMeshNumberingMngInternal::
2025setParentNodeCoordinates(
Cell parent_cell)
2033 if (m_dimension == 2) {
2048 nodes_coords[parent_cell.
node(6)] = nodes_coords[
childCellOfCell(parent_cell,
CartCoord3(m_pattern - 1, m_pattern - 1, m_pattern - 1)).node(6)];
2056Int64 CartesianMeshNumberingMngInternal::
2057parentCellUniqueIdOfCell(
Int64 uid,
Int32 level,
bool do_fatal)
2068 return NULL_ITEM_UNIQUE_ID;
2071 if (m_dimension == 2) {
2086Int64 CartesianMeshNumberingMngInternal::
2087parentCellUniqueIdOfCell(
Cell cell,
bool do_fatal)
2095Int64 CartesianMeshNumberingMngInternal::
2096childCellUniqueIdOfCell(
Cell cell,
CartCoord3 child_coord_in_parent)
2098 ARCANE_ASSERT((child_coord_in_parent.x < m_pattern && child_coord_in_parent.x >= 0), (
"Bad child_coord_in_parent.x"))
2099 ARCANE_ASSERT((child_coord_in_parent.y < m_pattern && child_coord_in_parent.y >= 0), (
"Bad child_coord_in_parent.y"))
2100 ARCANE_ASSERT((child_coord_in_parent.z < m_pattern && child_coord_in_parent.z >= 0), (
"Bad child_coord_in_parent.z"))
2114Int64 CartesianMeshNumberingMngInternal::
2115childCellUniqueIdOfCell(
Cell cell,
CartCoord2 child_coord_in_parent)
2117 ARCANE_ASSERT((child_coord_in_parent.x < m_pattern && child_coord_in_parent.x >= 0), (
"Bad child_coord_in_parent.x"))
2118 ARCANE_ASSERT((child_coord_in_parent.y < m_pattern && child_coord_in_parent.y >= 0), (
"Bad child_coord_in_parent.y"))
2131Int64 CartesianMeshNumberingMngInternal::
2132childCellUniqueIdOfCell(
Cell cell,
Int32 child_index_in_parent)
2134 if (m_dimension == 2) {
2135 ARCANE_ASSERT((child_index_in_parent < m_pattern * m_pattern && child_index_in_parent >= 0), (
"Bad child_index_in_parent"))
2139 child_index_in_parent % m_pattern,
2140 child_index_in_parent / m_pattern));
2143 ARCANE_ASSERT((child_index_in_parent < m_pattern * m_pattern * m_pattern && child_index_in_parent >= 0), (
"Bad child_index_in_parent"))
2145 const CartCoord to_2d = child_index_in_parent % (m_pattern * m_pattern);
2150 child_index_in_parent / (m_pattern * m_pattern)));
2156Cell CartesianMeshNumberingMngInternal::
2159 ARCANE_ASSERT((child_coord_in_parent.x < m_pattern && child_coord_in_parent.x >= 0), (
"Bad child_coord_in_parent.x"))
2160 ARCANE_ASSERT((child_coord_in_parent.y < m_pattern && child_coord_in_parent.y >= 0), (
"Bad child_coord_in_parent.y"))
2162 Cell child = cell.
hChild(child_coord_in_parent.x + (child_coord_in_parent.y * m_pattern) + (child_coord_in_parent.z * m_pattern * m_pattern));
2169 for (
Integer i = 0; i < nb_children; ++i) {
2182Cell CartesianMeshNumberingMngInternal::
2185 ARCANE_ASSERT((child_coord_in_parent.x < m_pattern && child_coord_in_parent.x >= 0), (
"Bad child_coord_in_parent.x"))
2186 ARCANE_ASSERT((child_coord_in_parent.y < m_pattern && child_coord_in_parent.y >= 0), (
"Bad child_coord_in_parent.y"))
2188 Cell child = cell.
hChild(child_coord_in_parent.x + (child_coord_in_parent.y * m_pattern));
2195 for (
Integer i = 0; i < nb_children; ++i) {
2208Int64 CartesianMeshNumberingMngInternal::
2209parentNodeUniqueIdOfNode(
Int64 uid,
Int32 level,
bool do_fatal)
2218 if (coord_x % m_pattern != 0 || coord_y % m_pattern != 0) {
2222 return NULL_ITEM_UNIQUE_ID;
2225 if (m_dimension == 2) {
2233 if (coord_z % m_pattern != 0) {
2237 return NULL_ITEM_UNIQUE_ID;
2248Int64 CartesianMeshNumberingMngInternal::
2249parentNodeUniqueIdOfNode(
Node node,
bool do_fatal)
2258Int64 CartesianMeshNumberingMngInternal::
2259childNodeUniqueIdOfNode(
Int64 uid,
Int32 level)
2261 if (m_dimension == 2) {
2276Int64 CartesianMeshNumberingMngInternal::
2277childNodeUniqueIdOfNode(
Node node)
2286Int64 CartesianMeshNumberingMngInternal::
2287parentFaceUniqueIdOfFace(
Int64 uid,
Int32 level,
bool do_fatal)
2289 if (m_converting_numbering_face && level == m_ori_level) {
2290 uid = m_face_ori_numbering_to_new[uid];
2307 if (parent_coord_x == -1 || parent_coord_y == -1) {
2311 return NULL_ITEM_UNIQUE_ID;
2317 if (m_dimension == 2) {
2318 if (m_converting_numbering_face && level - 1 == m_ori_level) {
2329 if (parent_coord_z == -1) {
2333 return NULL_ITEM_UNIQUE_ID;
2340 if (m_converting_numbering_face && level - 1 == m_ori_level) {
2341 return m_face_new_numbering_to_ori[
faceUniqueId(
CartCoord3(parent_coord_x, parent_coord_y, parent_coord_z), level - 1)];
2350Int64 CartesianMeshNumberingMngInternal::
2351parentFaceUniqueIdOfFace(
Face face,
bool do_fatal)
2360Int64 CartesianMeshNumberingMngInternal::
2361childFaceUniqueIdOfFace(
Int64 uid,
Int32 level,
Int32 child_index_in_parent)
2363 if (m_converting_numbering_face && level == m_ori_level) {
2364 uid = m_face_ori_numbering_to_new[uid];
2376 ARCANE_ASSERT((first_child_coord_x <
globalNbFacesXCartesianView(level + 1) && first_child_coord_x >= 0), (
"Bad first_child_coord_x"))
2377 ARCANE_ASSERT((first_child_coord_y <
globalNbFacesYCartesianView(level + 1) && first_child_coord_y >= 0), (
"Bad first_child_coord_y"))
2379 if (m_dimension == 2) {
2380 ARCANE_ASSERT((child_index_in_parent < m_pattern && child_index_in_parent >= 0), (
"Invalid child_index_in_parent"))
2382 if (coord_y % 2 == 0) {
2383 first_child_coord_x += child_index_in_parent * 2;
2385 else if (coord_x % 2 == 0) {
2386 first_child_coord_y += child_index_in_parent *
globalNbFacesY(level + 1);
2392 if (m_converting_numbering_face && level + 1 == m_ori_level) {
2393 return m_face_new_numbering_to_ori[
faceUniqueId(
CartCoord2(first_child_coord_x, first_child_coord_y), level + 1)];
2399 ARCANE_ASSERT((child_index_in_parent < m_pattern * m_pattern && child_index_in_parent >= 0), (
"Invalid child_index_in_parent"))
2405 ARCANE_ASSERT((first_child_coord_z <
globalNbFacesZCartesianView(level + 1) && first_child_coord_z >= 0), (
"Bad first_child_coord_z"))
2407 const CartCoord child_x = child_index_in_parent % m_pattern;
2408 const CartCoord child_y = child_index_in_parent / m_pattern;
2412 if (uid < three_parts_numbering.x) {
2413 first_child_coord_y += child_x * 2;
2414 first_child_coord_z += child_y * 2;
2416 else if (uid < three_parts_numbering.x + three_parts_numbering.y) {
2417 first_child_coord_x += child_x * 2;
2418 first_child_coord_z += child_y * 2;
2421 first_child_coord_x += child_x * 2;
2422 first_child_coord_y += child_y * 2;
2425 if (m_converting_numbering_face && level + 1 == m_ori_level) {
2426 return m_face_new_numbering_to_ori[
faceUniqueId(
CartCoord3(first_child_coord_x, first_child_coord_y, first_child_coord_z), level + 1)];
2429 return faceUniqueId(
CartCoord3(first_child_coord_x, first_child_coord_y, first_child_coord_z), level + 1);
2435Int64 CartesianMeshNumberingMngInternal::
2436childFaceUniqueIdOfFace(
Face face,
Int32 child_index_in_parent)
2445Int64x3 CartesianMeshNumberingMngInternal::
2446_face3DNumberingThreeParts(
Int32 level)
const
2449 return { (nb_cell.x + 1) * nb_cell.y * nb_cell.z, (nb_cell.y + 1) * nb_cell.z * nb_cell.x, (nb_cell.z + 1) * nb_cell.x * nb_cell.y };
2455void CartesianMeshNumberingMngInternal::
2459 array.
back() = elem;
2461 std::swap(array[i], array[i + 1]);
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Integer size() const
Nombre d'éléments du vecteur.
Vue modifiable d'un tableau d'un type T.
void fill(const T &o) noexcept
Remplit le tableau avec la valeur o.
constexpr Integer size() const noexcept
Retourne la taille du tableau.
void resize(Int64 s)
Change le nombre d'éléments du tableau à s.
T & back()
Dernier élément du tableau.
CartCoord globalNbFacesXCartesianView(Int32 level) const override
Méthode permettant de récupérer la taille de la vue "grille cartésienne" contenant les faces.
Int32 pattern() const override
Méthode permettant de récupérer le pattern de raffinement utilisé dans chaque maille....
Int64 childNodeUniqueIdOfNode(Int64 uid, Int32 level) override
Méthode permettant de récupérer l'uniqueId d'un noeud enfant d'un noeud parent.
Int64x3 _face3DNumberingThreeParts(Int32 level) const
Méthode permettant de récupérer le nombre de faces des trois parties de la numérotation.
Int64 nbNodeInLevel(Int32 level) const override
Méthode permettant de récupérer le nombre de noeuds total dans un niveau.
Cell childCellOfCell(Cell cell, CartCoord3 child_coord_in_parent) override
Méthode permettant de récupérer une maille enfant d'une maille parent à partir de la position de la m...
Int64 nbCellInLevel(Int32 level) const override
Méthode permettant de récupérer le nombre de mailles total dans un niveau.
CartCoord faceUniqueIdToCoordX(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en X d'une face grâce à son uniqueId.
void cellFaceUniqueIds(CartCoord3 cell_coord, Int32 level, ArrayView< Int64 > uid) override
Méthode permettant de récupérer les uniqueIds des faces d'une maille à partir de ses coordonnées.
CartCoord cellUniqueIdToCoordX(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en X d'une maille grâce à son uniqueId.
Int64 childFaceUniqueIdOfFace(Int64 uid, Int32 level, Int32 child_index_in_parent) override
Méthode permettant de récupérer l'uniqueId d'une face enfant d'une face parent à partir de l'index de...
void cellUniqueIdsAroundCell(CartCoord3 cell_coord, Int32 level, ArrayView< Int64 > uid) override
Méthode permettant de récupérer les uniqueIds des mailles autour d'une maille.
CartCoord3 cellUniqueIdToCoord(Int64 uid, Int32 level) override
Méthode permettant de récupérer les coordonnées d'une maille grâce à son uniqueId.
CartCoord offsetLevelToLevel(CartCoord coord, Int32 level_from, Int32 level_to) const override
Méthode permettant d'obtenir la position du premier noeud/maille fille à partir de la position du noe...
void cellUniqueIdsAroundNode(CartCoord3 node_coord, Int32 level, ArrayView< Int64 > uid) override
Méthode permettant de récupérer les uniqueIds des mailles autour d'un noeud.
CartCoord nodeUniqueIdToCoordX(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en X d'un noeud grâce à son uniqueId.
CartCoord globalNbFacesYCartesianView(Int32 level) const override
Méthode permettant de récupérer la taille de la vue "grille cartésienne" contenant les faces.
Int64 parentFaceUniqueIdOfFace(Int64 uid, Int32 level, bool do_fatal) override
Méthode permettant de récupérer l'uniqueId du parent d'une face.
Int64 firstFaceUniqueId(Int32 level) const override
Méthode permettant de récupérer le premier unique id utilisé par les faces d'un niveau....
Int64 nbFaceInLevel(Int32 level) const override
Méthode permettant de récupérer le nombre de faces total dans un niveau.
CartCoord nodeUniqueIdToCoordY(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en Y d'un noeud grâce à son uniqueId.
Int32 faceLevel(Int64 uid) const override
Méthode permettant de récupérer le niveau d'une face avec son uid.
CartCoord faceOffsetLevelToLevel(CartCoord coord, Int32 level_from, Int32 level_to) const override
Méthode permettant d'obtenir la position de la première face enfant à partir de la position de la fac...
CartCoord globalNbCellsZ(Int32 level) const override
Méthode permettant de récupérer le nombre de mailles global en Z d'un niveau.
CartCoord nodeUniqueIdToCoordZ(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en Z d'un noeud grâce à son uniqueId.
Int64 firstCellUniqueId(Int32 level) const override
Méthode permettant de récupérer le premier unique id utilisé par les mailles d'un niveau....
Int64 parentNodeUniqueIdOfNode(Int64 uid, Int32 level, bool do_fatal) override
Méthode permettant de récupérer l'uniqueId du parent d'un noeud.
CartCoord globalNbFacesZCartesianView(Int32 level) const override
Méthode permettant de récupérer la taille de la vue "grille cartésienne" contenant les faces.
Int32 nbNodeByCell() override
Méthode permettant de récupérer le nombre de noeuds dans une maille.
CartCoord globalNbNodesX(Int32 level) const override
Méthode permettant de récupérer le nombre de noeuds global en X d'un niveau.
CartCoord cellUniqueIdToCoordZ(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en Z d'une maille grâce à son uniqueId.
Int32 nbFaceByCell() override
Méthode permettant de récupérer le nombre de faces dans une maille.
void cellNodeUniqueIds(CartCoord3 cell_coord, Int32 level, ArrayView< Int64 > uid) override
Méthode permettant de récupérer les uniqueIds des noeuds d'une maille à partir de ses coordonnées.
CartCoord faceUniqueIdToCoordZ(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en Z d'une face grâce à son uniqueId.
CartCoord faceUniqueIdToCoordY(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en Y d'une face grâce à son uniqueId.
Int64 cellUniqueId(CartCoord3 cell_coord, Int32 level) override
Méthode permettant de récupérer l'uniqueId d'une maille à partir de sa position et de son niveau.
CartCoord globalNbCellsX(Int32 level) const override
Méthode permettant de récupérer le nombre de mailles global en X d'un niveau.
Int64 nodeUniqueId(CartCoord3 node_coord, Int32 level) override
Méthode permettant de récupérer l'uniqueId d'un noeud à partir de sa position et de son niveau.
CartCoord globalNbCellsY(Int32 level) const override
Méthode permettant de récupérer le nombre de mailles global en Y d'un niveau.
Int64 firstNodeUniqueId(Int32 level) const override
Méthode permettant de récupérer le premier unique id utilisé par les noeuds d'un niveau....
CartCoord globalNbNodesY(Int32 level) const override
Méthode permettant de récupérer le nombre de noeuds global en Y d'un niveau.
Int64 faceUniqueId(CartCoord3 face_coord, Int32 level) override
Méthode permettant de récupérer l'uniqueId d'une face à partir de sa position et de son niveau.
CartCoord globalNbFacesY(Int32 level) const override
Méthode permettant de récupérer le nombre de faces global en Y d'un niveau.
Int32 nodeLevel(Int64 uid) const override
Méthode permettant de récupérer le niveau d'un noeud avec son uid.
Int64 childCellUniqueIdOfCell(Cell cell, CartCoord3 child_coord_in_parent) override
Méthode permettant de récupérer l'uniqueId d'une maille enfant d'une maille parent à partir de la pos...
CartCoord globalNbFacesX(Int32 level) const override
Méthode permettant de récupérer le nombre de faces global en X d'un niveau.
CartCoord cellUniqueIdToCoordY(Int64 uid, Int32 level) override
Méthode permettant de récupérer la coordonnée en Y d'une maille grâce à son uniqueId.
Int64 parentCellUniqueIdOfCell(Int64 uid, Int32 level, bool do_fatal) override
Méthode permettant de récupérer l'uniqueId du parent d'une maille.
Int32 nbHChildren() const
Nombre d'enfants pour l'AMR.
Cell hChild(Int32 i) const
i-ème enfant AMR
Vue constante d'un tableau de type T.
Interface du gestionnaire de traces.
virtual TraceMessage info()=0
Flot pour un message d'information.
Int32 flags() const
Flags de l'entité
@ II_JustAdded
L'entité vient d'être ajoutée.
@ II_JustRefined
L'entité vient d'être raffinée.
Node node(Int32 i) const
i-ème noeud de l'entité
ItemUniqueId uniqueId() const
Identifiant unique sur tous les domaines.
impl::ItemBase itemBase() const
Partie interne de l'entité.
Classe gérant un vecteur de réel de dimension 3.
Classe d'accès aux traces.
TraceMessage info() const
Flot pour un message d'information.
Positionne une classe de message.
Vecteur 1D de données avec sémantique par valeur (style STL).
T max(const T &a, const T &b, const T &c)
Retourne le maximum de trois éléments.
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Grandeur au noeud de type coordonnées.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Int32 CartCoord
Représente une coordonnée d'un élément dans la grille cartésienne (en X ou en Y ou en Z).
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
ConstArrayView< Int64 > Int64ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 64 bits.
double Real
Type représentant un réel.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Créé une référence sur un pointeur.
Int32x2 CartCoord2
Représente les coordonnées 2D d'un élément dans la grille cartésienne {x, y}.
std::int32_t Int32
Type entier signé sur 32 bits.
Int32x3 CartCoord3
Représente les coordonnées 3D d'un élément dans la grille cartésienne {x, y, z}.
Real y
deuxième composante du triplet
Real z
troisième composante du triplet
Real x
première composante du triplet