14#ifndef AMRMAXCONSISTENCYITER
15#define AMRMAXCONSISTENCYITER 10
22#include "arcane/utils/Real3.h"
23#include "arcane/utils/ArgumentException.h"
25#include "arcane/core/IParallelMng.h"
26#include "arcane/core/IMesh.h"
27#include "arcane/core/IItemFamily.h"
28#include "arcane/core/Item.h"
30#include "arcane/core/VariableTypes.h"
31#include "arcane/core/ItemPrinter.h"
32#include "arcane/core/SharedVariable.h"
33#include "arcane/core/ItemRefinementPattern.h"
34#include "arcane/core/Properties.h"
35#include "arcane/core/IGhostLayerMng.h"
36#include "arcane/core/ItemVector.h"
38#include "arcane/mesh/DynamicMesh.h"
39#include "arcane/mesh/ItemRefinement.h"
40#include "arcane/mesh/MeshRefinement.h"
41#include "arcane/mesh/ParallelAMRConsistency.h"
42#include "arcane/mesh/FaceReorienter.h"
43#include "arcane/mesh/NodeFamily.h"
44#include "arcane/mesh/EdgeFamily.h"
46#include "arcane/core/materials/IMeshMaterialMng.h"
58 void _setRefineFlags(Item v)
60 Integer f = v.itemBase().flags();
61 f &= ~ItemFlags::II_Coarsen;
63 v.mutableItemBase().setFlags(f);
65 void _setCoarseFlags(Item v)
67 Integer f = v.itemBase().flags();
68 f &= ~ItemFlags::II_Refine;
70 v.mutableItemBase().setFlags(f);
78#ifdef ACTIVATE_PERF_COUNTER
79const std::string MeshRefinement::PerfCounter::m_names[MeshRefinement::PerfCounter::NbCounters] = {
103, m_face_family(&(
mesh->trueFaceFamily()))
109, m_face_level_mismatch_limit(1)
110, m_max_node_uid(NULL_ITEM_UNIQUE_ID)
111, m_next_node_uid(NULL_ITEM_UNIQUE_ID)
112, m_max_cell_uid(NULL_ITEM_UNIQUE_ID)
113, m_next_cell_uid(NULL_ITEM_UNIQUE_ID)
114, m_max_face_uid(NULL_ITEM_UNIQUE_ID)
115, m_next_face_uid(NULL_ITEM_UNIQUE_ID)
116, m_max_nb_hChildren(0)
123 m_need_update =
true;
126 m_node_owner_memory[inode] = inode->owner();
128#ifdef ACTIVATE_PERF_COUNTER
129 m_perf_counter.init();
151 CHECKPERF(m_perf_counter.start(PerfCounter::CLEAR))
152 m_node_finder._clear();
153 m_face_finder._clear();
154 CHECKPERF(m_perf_counter.stop(PerfCounter::CLEAR))
163 CHECKPERF(m_perf_counter.start(PerfCounter::INIT))
166 Int64 max_node_uid = 0;
168 const Node& node = *inode;
170 if (uid > max_node_uid)
177 m_max_node_uid = max_node_uid;
178 info() <<
"NODE_UID_INFO: MY_MAX_UID=" << max_node_uid <<
" GLOBAL=" << m_max_node_uid;
179 m_next_node_uid = m_max_node_uid + 1 +
m_mesh->parallelMng()->commRank();
184 Int64 max_cell_uid = 0;
187 const Cell& cell = *icell;
190 if (uid > max_cell_uid)
192 if (nb_hChildren > max_nb_hChildren)
193 max_nb_hChildren = nb_hChildren;
200 m_max_cell_uid = max_cell_uid;
201 m_max_nb_hChildren = max_nb_hChildren;
203 info() <<
"CELL_UID_INFO: MY_MAX_UID=" << max_cell_uid <<
" GLOBAL=" << m_max_cell_uid;
204 m_next_cell_uid = m_max_cell_uid + 1 + pm->
commRank() * m_max_nb_hChildren;
208 Int64 max_face_uid = 0;
210 const Face& face = *iface;
212 if (uid > max_face_uid)
219 m_max_face_uid = max_face_uid;
220 info() <<
"FACE_UID_INFO: MY_MAX_UID=" << max_face_uid <<
" GLOBAL=" << m_max_face_uid;
221 m_next_face_uid = m_max_face_uid + 1 + pm->
commRank();
226 CHECKPERF(m_perf_counter.stop(PerfCounter::INIT))
233 CHECKPERF(m_perf_counter.start(PerfCounter::INIT))
238 Int64 max_node_uid = m_max_node_uid;
239 Int64 max_cell_uid = m_max_cell_uid;
240 Integer max_nb_hChildren = m_max_nb_hChildren;
241 Int64 max_face_uid = m_max_face_uid;
243 typedef std::set<Int64> set_type;
244 typedef std::pair<set_type::iterator, bool> insert_return_type;
247 for (
Integer icell = 0; icell < cells.
size(); ++icell) {
248 Cell cell = cells[icell];
255 if (cell_uid > max_cell_uid)
256 max_cell_uid = cell_uid;
257 if (nb_hChildren > max_nb_hChildren)
258 max_nb_hChildren = nb_hChildren;
262 const Int64 uid = inode.uniqueId();
263 insert_return_type value = node_list.insert(uid);
265 if (uid > max_node_uid)
271 for (Face iface : child.
faces()) {
272 const Int64 uid = iface.uniqueId();
273 insert_return_type value = face_list.insert(uid);
275 if (uid > max_face_uid)
289 m_max_node_uid = max_node_uid;
290 m_max_cell_uid = max_cell_uid;
291 m_max_nb_hChildren = max_nb_hChildren;
292 m_max_face_uid = max_face_uid;
294 m_next_node_uid = m_max_node_uid + 1 +
m_mesh->parallelMng()->commRank();
295 m_next_cell_uid = m_max_cell_uid + 1 + pm->
commRank() * m_max_nb_hChildren;
296 m_next_face_uid = m_max_face_uid + 1 + pm->
commRank();
299 CHECKPERF(m_perf_counter.stop(PerfCounter::INIT))
302void MeshRefinement::initMeshContainingBox()
309void MeshRefinement::update()
312 initMeshContainingBox();
314 m_node_finder.init();
316 m_face_finder.initFaceCenter();
317 m_face_finder.init();
320 m_need_update =
false;
329 for (
Integer i = 0, is = lids.
size(); i < is; i++) {
330 Item item = cells[lids[i]];
343 for (
Integer i = 0, is = lids.
size(); i < is; i++) {
344 Item item = cells[lids[i]];
355 CHECKPERF(m_perf_counter.start(PerfCounter::INIT))
357 bool _maintain_level_one = maintain_level_one;
360 if (!maintain_level_one) {
361 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
364 _maintain_level_one = m_face_level_mismatch_limit;
367 if (_maintain_level_one) {
373 CHECKPERF(m_perf_counter.stop(PerfCounter::INIT))
378 if (
m_mesh->parallelMng()->isParallel())
381 CHECKPERF(m_perf_counter.start(PerfCounter::CONSIST))
386 bool satisfied =
false;
390 satisfied = (coarsening_satisfied && refinement_satisfied);
392 bool max_satisfied = satisfied, min_satisfied = satisfied;
395 ARCANE_ASSERT((satisfied == max_satisfied), (
"parallel max_satisfied failed"));
396 ARCANE_ASSERT((satisfied == min_satisfied), (
"parallel min_satisfied failed"));
398 }
while (!satisfied);
400 }
while (
m_mesh->parallelMng()->isParallel() && !this->_makeFlagParallelConsistent() && iter < 10);
401 if (iter == AMRMAXCONSISTENCYITER)
402 fatal() <<
" MAX CONSISTENCY ITER REACHED";
403 CHECKPERF(m_perf_counter.stop(PerfCounter::CONSIST))
406 CHECKPERF(m_perf_counter.start(PerfCounter::COARSEN))
408 CHECKPERF(m_perf_counter.stop(PerfCounter::COARSEN))
413 const bool refining_changed_mesh = this->
_refineItems(cells_to_refine);
416 if (refining_changed_mesh || coarsening_changed_mesh) {
417 bool do_compact =
m_mesh->properties()->getBool(
"compact");
418 m_mesh->properties()->setBool(
"compact",
true);
421 CHECKPERF(m_perf_counter.start(PerfCounter::ENDUPDATE))
422 m_mesh->modifier()->endUpdate();
423 m_mesh->properties()->setBool(
"compact", do_compact);
424 CHECKPERF(m_perf_counter.stop(PerfCounter::ENDUPDATE))
428 if (coarsening_changed_mesh) {
431 CHECKPERF(m_perf_counter.start(PerfCounter::CONTRACT))
433 CHECKPERF(m_perf_counter.stop(PerfCounter::CONTRACT))
435 CHECKPERF(m_perf_counter.start(PerfCounter::ENDUPDATE))
436 m_mesh->properties()->setBool(
"compact",
true);
437 m_mesh->modifier()->endUpdate();
438 m_mesh->properties()->setBool(
"compact", do_compact);
439 CHECKPERF(m_perf_counter.stop(PerfCounter::ENDUPDATE))
443 CHECKPERF(m_perf_counter.start(PerfCounter::INTERP))
445 CHECKPERF(m_perf_counter.stop(PerfCounter::INTERP))
448 if (!coarsening_changed_mesh &&
m_mesh->parallelMng()->isParallel())
449 this->_makeFlagParallelConsistent2();
451 if (
m_mesh->parallelMng()->isParallel()) {
452 CHECKPERF(m_perf_counter.start(PerfCounter::PGHOST))
453 m_mesh->modifier()->setDynamic(
true);
456 m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine,
457 ghost_cell_to_coarsen,
459 _update(ghost_cell_to_refine);
460 CHECKPERF(m_perf_counter.stop(PerfCounter::PGHOST))
461 _checkOwner(
"refineAndCoarsenItems after ghost update");
475#ifdef ACTIVATE_PERF_COUNTER
476 info() <<
"MESH REFINEMENT PERF INFO";
477 m_perf_counter.printInfo(
info().file());
478 info() <<
"NODE FINDER PERF INFO";
479 m_node_finder.getPerfCounter().printInfo(
info().file());
480 info() <<
"FACE FINDER PERF INFO";
481 m_face_finder.getPerfCounter().printInfo(
info().file());
482 info() <<
"PARALLEL AMR CONSISTENCY PERF INFO";
498 bool _maintain_level_one = maintain_level_one;
501 if (!maintain_level_one) {
502 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
505 _maintain_level_one = m_face_level_mismatch_limit;
508 if (_maintain_level_one) {
509 ARCANE_ASSERT((
_checkLevelOne(
true)), (
"check_level_one failed"));
518 if (
m_mesh->parallelMng()->isParallel())
524 bool satisfied =
false;
527 satisfied = coarsening_satisfied;
529 bool max_satisfied = satisfied, min_satisfied = satisfied;
532 ARCANE_ASSERT((satisfied == max_satisfied), (
"parallel max_satisfied failed"));
533 ARCANE_ASSERT((satisfied == min_satisfied), (
"parallel min_satisfied failed"));
535 }
while (!satisfied);
536 }
while (
m_mesh->parallelMng()->isParallel() && !this->_makeFlagParallelConsistent());
548 _checkOwner(
"coarsenItems");
573 if (cell.
level() == 0) {
580 if (update_parent_flag) {
591 ARCANE_FATAL(
"Parent cannot have children with coarse flag and children without coarse flag -- Parent uid: {0} -- Child uid: {1}", parent.
uniqueId(), child.
uniqueId());
599 ARCANE_FATAL(
"Cannot coarse parent and child in same time");
602 ARCANE_FATAL(
"For now, cannot coarse cell with children");
615 if (
m_mesh->parallelMng()->isParallel()) {
616 bool has_ghost_layer =
m_mesh->ghostLayerMng()->nbGhostLayer() != 0;
622 Cell other_cell = face.oppositeCell(cell);
625 if (other_cell.
null()) {
639 ARCANE_FATAL(
"Max one level diff between two cells is allowed -- Uid of Cell to be coarseing: {0} -- Uid of Opposite cell with children: {1}", cell.
uniqueId(), other_cell.
uniqueId());
646 face.mutableItemBase().setOwner(other_cell.
owner(), cell.
owner());
655 bool will_deleted =
true;
656 for (
Cell cell2 : node.cells()) {
658 will_deleted =
false;
669 Integer node_owner = node.owner();
671 bool need_new_owner =
true;
672 for (
Cell cell2 : node.cells()) {
674 if (cell2.owner() == node_owner) {
675 need_new_owner =
false;
678 new_owner = cell2.owner();
681 if (!need_new_owner) {
687 node.mutableItemBase().setOwner(new_owner, cell.
owner());
694 if (!has_ghost_layer) {
696 ARCANE_NOT_YET_IMPLEMENTED(
"Support des maillages sans mailles fantômes à faire");
702 m_mesh->modifier()->removeCells(to_coarse);
703 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
704 m_mesh->faceFamily()->notifyItemsOwnerChanged();
705 m_mesh->modifier()->endUpdate();
706 m_mesh->cellFamily()->computeSynchronizeInfos();
707 m_mesh->nodeFamily()->computeSynchronizeInfos();
708 m_mesh->faceFamily()->computeSynchronizeInfos();
709 m_mesh->modifier()->setDynamic(
true);
714 if (!update_parent_flag) {
722 m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine, ghost_cell_to_coarsen,
true);
734 bool _maintain_level_one = maintain_level_one;
737 if (!maintain_level_one) {
738 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
741 _maintain_level_one = m_face_level_mismatch_limit;
743 if (_maintain_level_one) {
744 ARCANE_ASSERT((
_checkLevelOne(
true)), (
"check_level_one failed"));
752 if (
m_mesh->parallelMng()->isParallel())
758 bool satisfied =
false;
761 satisfied = refinement_satisfied;
763 bool max_satisfied = satisfied, min_satisfied = satisfied;
766 ARCANE_ASSERT((satisfied == max_satisfied), (
"parallel max_satisfied failed"));
767 ARCANE_ASSERT((satisfied == min_satisfied), (
"parallel min_satisfied failed"));
769 }
while (!satisfied);
770 }
while (
m_mesh->parallelMng()->isParallel() && !this->_makeFlagParallelConsistent());
775 const bool mesh_changed = this->
_refineItems(cells_to_refine);
780 bool do_compact =
m_mesh->properties()->getBool(
"compact");
781 m_mesh->properties()->setBool(
"compact",
true);
782 m_mesh->modifier()->endUpdate();
783 m_mesh->properties()->setBool(
"compact", do_compact);
789 m_mesh->modifier()->setDynamic(
true);
792 m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine, ghost_cell_to_coarsen,
false);
793 _update(ghost_cell_to_refine);
812 for (
Integer rstep = 0; rstep < n; rstep++) {
820 _setRefineFlags(cell);
825 warning() <<
"ATTENTION: No Data Projection with this method!";
828 bool do_compact =
m_mesh->properties()->getBool(
"compact");
829 m_mesh->properties()->setBool(
"compact",
true);
830 m_mesh->modifier()->endUpdate();
831 m_mesh->properties()->setBool(
"compact", do_compact);
841 for (
Integer rstep = 0; rstep < n; rstep++) {
849 _setCoarseFlags(cell);
856 warning() <<
"ATTENTION: No Data Restriction with this method!";
860 bool do_compact =
m_mesh->properties()->getBool(
"compact");
861 m_mesh->properties()->setBool(
"compact",
true);
862 m_mesh->modifier()->endUpdate();
863 m_mesh->properties()->setBool(
"compact", do_compact);
875 Int64 uid = m_node_finder.find(p, tol);
876 if (uid != NULL_ITEM_ID) {
881 Int64 new_uid = m_next_node_uid;
882 m_node_finder.insert(p, new_uid, tol);
883 m_next_node_uid +=
m_mesh->parallelMng()->commSize() + 1;
896 Int64 uid = m_face_finder.find(p, tol);
897 if (uid != NULL_ITEM_ID) {
904 Int64 new_uid = m_next_face_uid;
905 m_face_finder.insert(p, new_uid, tol);
906 m_next_face_uid +=
m_mesh->parallelMng()->commSize() + 1;
918 Int64 new_uid = m_next_cell_uid;
919 Int64 comm_size =
m_mesh->parallelMng()->commSize();
920 m_next_cell_uid += comm_size * m_max_nb_hChildren;
935 m_node_finder.check();
937 m_face_finder.check();
938 debug() <<
"[MeshRefinement::updateLocalityMap] done";
959 bool failure =
false;
966 if (face.nbCell() != 2)
968 Cell back_cell = face.backCell();
969 Cell front_cell = face.frontCell();
972 Cell neighbor = (back_cell == cell) ? front_cell : back_cell;
989 if (arcane_assert_pass)
1002 bool found_flag =
false;
1007 const Cell cell = *icell;
1019 if (arcane_assert_pass)
1032 if (!
m_mesh->parallelMng()->isParallel())
1035 CHECKPERF(m_perf_counter.start(PerfCounter::PCONSIST))
1036 debug() <<
"makeFlagsParallelConsistent() begin";
1037 bool parallel_consistent =
true;
1045 flag_cells_consistent[icell] = f;
1048 ghost_cells.
add(cell);
1050 flag_cells_consistent.synchronize();
1052 for (
Integer icell = 0, nb_cell = ghost_cells.
size(); icell < nb_cell; ++icell) {
1053 Item iitem = ghost_cells[icell];
1061 const Integer g = flag_cells_consistent[
Cell(iitem)];
1065 parallel_consistent =
false;
1070 parallel_consistent =
false;
1075 parallel_consistent =
false;
1080 parallel_consistent =
false;
1107 debug() <<
"makeFlagsParallelConsistent() end -- parallel_consistent : " << parallel_consistent;
1109 CHECKPERF(m_perf_counter.stop(PerfCounter::PCONSIST))
1110 return parallel_consistent;
1114bool MeshRefinement::
1115_makeFlagParallelConsistent2()
1120 CHECKPERF(m_perf_counter.start(PerfCounter::PCONSIST2))
1121 debug() <<
"makeFlagsParallelConsistent2() begin";
1122 bool parallel_consistent =
true;
1130 flag_cells_consistent[icell] = f;
1133 ghost_cells.
add(cell);
1135 flag_cells_consistent.synchronize();
1137 for (
Integer icell = 0, nb_cell = ghost_cells.
size(); icell < nb_cell; ++icell) {
1141 Item iitem = ghost_cells[icell];
1142 Integer f = iitem.itemBase().flags();
1149 iitem.mutableItemBase().setFlags(f);
1150 parallel_consistent =
false;
1154 iitem.mutableItemBase().setFlags(f);
1155 parallel_consistent =
false;
1159 iitem.mutableItemBase().setFlags(f);
1160 parallel_consistent =
false;
1172 debug() <<
"makeFlagsParallelConsistent2() end";
1174 CHECKPERF(m_perf_counter.stop(PerfCounter::PCONSIST2))
1175 return parallel_consistent;
1184 debug() <<
"makeCoarseningCompatible() begin";
1186 bool _maintain_level_one = maintain_level_one;
1189 if (!maintain_level_one) {
1190 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
1193 _maintain_level_one = m_face_level_mismatch_limit;
1197 bool level_one_satisfied =
true;
1201 bool compatible_with_refinement =
true;
1211 const Cell cell = *icell;
1212 max_level = std::max(max_level, cell.
level());
1223 if (max_level == 0) {
1224 debug() <<
"makeCoarseningCompatible() done";
1229 return compatible_with_refinement;
1238 if (_maintain_level_one) {
1241 level_one_satisfied =
true;
1244 level_one_satisfied =
true;
1249 bool my_flag_changed =
false;
1254 if (face.nbCell() != 2)
1256 Cell back_cell = face.backCell();
1257 Cell front_cell = face.frontCell();
1260 Cell neighbor = (back_cell == cell) ? front_cell : back_cell;
1267 if ((neighbor.
level() == my_level) &&
1272 my_flag_changed =
true;
1284 my_flag_changed =
true;
1293 if (my_flag_changed)
1294 level_one_satisfied =
false;
1300 if (my_flag_changed &&
m_mesh->parallelMng()->isParallel())
1302 if (face.nbCell() != 2)
1304 Cell back_cell = face.backCell();
1305 Cell front_cell = face.frontCell();
1308 Cell neighbor = (back_cell == cell) ? front_cell : back_cell;
1310 if (neighbor.
owner() != sid) {
1311 compatible_with_refinement =
false;
1319 compatible_with_refinement =
false;
1324 }
while (!level_one_satisfied);
1334 for (
int level = (max_level); level >= 0; level--) {
1337 const Cell cell = *icell;
1342 bool is_a_candidate =
true;
1343 bool found_remote_child =
false;
1347 if (child.
owner() != sid)
1348 found_remote_child =
true;
1350 is_a_candidate =
false;
1353 if (!is_a_candidate && !found_remote_child) {
1357 if (child.
owner() != sid)
1360 level_one_satisfied =
false;
1371 if (!level_one_satisfied && _maintain_level_one)
1377 const Cell cell = *icell;
1382 bool all_children_flagged_for_coarsening =
true;
1383 bool found_remote_child =
false;
1387 if (child.
owner() != sid)
1388 found_remote_child =
true;
1390 all_children_flagged_for_coarsening =
false;
1394 if (!found_remote_child && all_children_flagged_for_coarsening) {
1398 else if (!found_remote_child) {
1405 debug() <<
"makeCoarseningCompatible() done";
1410 return compatible_with_refinement;
1420 debug() <<
"makeRefinementCompatible() begin";
1422 bool _maintain_level_one = maintain_level_one;
1425 if (!maintain_level_one) {
1426 warning() <<
"Warning, level one rule is the only condition accepted now for AMR!";
1429 _maintain_level_one = m_face_level_mismatch_limit;
1433 bool level_one_satisfied =
true;
1437 bool compatible_with_coarsening =
true;
1442 if (_maintain_level_one) {
1444 level_one_satisfied =
true;
1447 const Cell cell = *icell;
1451 bool refinable =
true;
1454 if (face.nbCell() != 2)
1456 Cell back_cell = face.backCell();
1457 Cell front_cell = face.frontCell();
1460 Cell neighbor = (back_cell == cell) ? front_cell : back_cell;
1471 if (((neighbor.
level() + 1) == my_level) &&
1483 if (face.nbCell() != 2)
1485 Cell back_cell = face.backCell();
1486 Cell front_cell = face.frontCell();
1489 Cell neighbor = (back_cell == cell) ? front_cell : back_cell;
1497 if (neighbor.
level() == my_level) {
1506 compatible_with_coarsening =
false;
1507 level_one_satisfied =
false;
1518 else if ((neighbor.
level() + 1) == my_level) {
1527 compatible_with_coarsening =
false;
1528 level_one_satisfied =
false;
1535 else if ((neighbor.
level() + 1) < my_level) {
1536 fatal() <<
"a neighbor is more than one level away";
1544 fatal() <<
"serious problem: we should never get here";
1551 }
while (!level_one_satisfied);
1557 debug() <<
"makeRefinementCompatible() done";
1559 return compatible_with_coarsening;
1568 debug() <<
"[MeshRefinement::_coarsenItems] begin" <<
m_mesh->allNodes().size();
1570 bool mesh_changed =
false;
1583 ARCANE_ASSERT((cell.
level() != 0), (
"no level-0 element should be active and flagged for coarsening"));
1600 mesh_changed =
true;
1603 switch (cell.
type()) {
1607 case IT_Tetraedron4:
1613 case IT_Pentaedron6:
1628 case IT_AntiWedgeLeft6:
1631 case IT_AntiWedgeRight6:
1638 ARCANE_FATAL(
"Not supported refinement Item Type type={0}", iitem.type());
1640 ARCANE_ASSERT(cell.
isActive(), (
"cell_active failed"));
1643 mesh_changed =
true;
1658 debug() <<
"[MeshRefinement::_coarsenItems()] done " <<
m_mesh->allNodes().size();
1660 return mesh_changed;
1671 debug() <<
"[MeshRefinement::_refineItems]" <<
m_mesh->allNodes().size();
1673 m_node_finder.check();
1674 m_face_finder.check();
1676 CHECKPERF(m_perf_counter.start(PerfCounter::REFINE))
1677 m_face_finder.clearNewUids();
1686 cell_to_refine_internals.
add(cell);
1689 debug() <<
"[MeshRefinement::_refineItems] " << cell_to_refine_uids.
size() <<
" flagged cells for refinement";
1704 const Int32 i_size = cell_to_refine_internals.
size();
1705 for (
Integer e = 0; e != i_size; ++e) {
1706 Cell iitem = cell_to_refine_internals[e];
1708 switch (iitem.
type()) {
1712 case IT_Tetraedron4:
1718 case IT_Pentaedron6:
1733 case IT_AntiWedgeLeft6:
1736 case IT_AntiWedgeRight6:
1743 ARCANE_FATAL(
"Not supported refinement Item Type type={0}", iitem.type());
1748 bool mesh_changed = !(i_size == 0);
1755 for (
Integer e = 0; e != i_size; ++e) {
1756 Cell i_hParent_cell = cell_to_refine_internals[e];
1757 populateBackFrontCellsFromParentFaces(i_hParent_cell);
1760 CHECKPERF(m_perf_counter.stop(PerfCounter::REFINE))
1761 if (mesh_changed &&
m_mesh->parallelMng()->isParallel()) {
1762 CHECKPERF(m_perf_counter.start(PerfCounter::PGCONSIST))
1764 m_node_finder.check2();
1765 m_face_finder.check2();
1770 CHECKPERF(m_perf_counter.stop(PerfCounter::PGCONSIST))
1773 debug() <<
"[MeshRefinement::_refineItems] done" <<
m_mesh->allNodes().size();
1775 return mesh_changed;
1788 Integer f = mutable_cell.flags();
1791 mutable_cell.setFlags(f);
1795 mutable_cell.setFlags(f);
1801 mutable_cell.setFlags(f);
1806 mutable_cell.setFlags(f);
1811 mutable_cell.setFlags(f);
1816 mutable_cell.setFlags(f);
1831 bool mesh_changed =
false;
1834 cells_map.
eachItem([&](impl::ItemBase item) {
1842 std::set<Int32> cells_to_remove_set;
1845 cells_map.
eachItem([&](impl::ItemBase iitem) {
1852 ARCANE_ASSERT((iitem.
nbHParent() != 0), (
""));
1853 cells_to_remove_set.insert(iitem.
localId());
1855 mesh_changed =
true;
1860 bool active_parent =
false;
1862 impl::ItemBase ichild = iitem.hChildBase(c);
1866 cells_to_remove_set.insert(ichild.
localId());
1868 active_parent =
true;
1871 if (active_parent) {
1872 parent_cells.
add(iitem._itemInternal());
1876 mesh_changed =
true;
1885 std::copy(std::begin(cells_to_remove_set), std::end(cells_to_remove_set), std::begin(cell_lids));
1887 if (
m_mesh->parallelMng()->isParallel()) {
1888 this->_makeFlagParallelConsistent2();
1889 this->_removeGhostChildren();
1890 this->_updateItemOwner(cell_lids);
1891 m_mesh->parallelMng()->barrier();
1893 if (cell_lids.
size() > 0) {
1895 _invalidate(parent_cells);
1897 m_mesh->modifier()->removeCells(cell_lids,
false);
1899 for (
Integer i = 0; i < ps; i++)
1903 mesh_changed =
false;
1905 return mesh_changed;
1911void MeshRefinement::
1920void MeshRefinement::
1932 const Int32 nb_cells = cells_to_refine.
size();
1938 for (
Integer i = 0; i < nb_cells; i++) {
1939 cells_to_refine_internals[i] = ItemCompatibility::_itemInternal(internals[lids[i]]);
1941 m_call_back_mng->callCallBacks(cells_to_refine_internals, Prolongation);
1942 _update(cells_to_refine_internals);
1945void MeshRefinement::
1948 CHECKPERF(m_perf_counter.start(PerfCounter::UPDATEMAP))
1949 const Int32 nb_cells = cells_to_refine_uids.
size();
1954 for (
Integer i = 0; i < nb_cells; i++) {
1955 cells_to_refine[i] = ItemCompatibility::_itemInternal(internals[lids[i]]);
1957 m_node_finder.updateData(cells_to_refine);
1958 m_face_finder.updateData(cells_to_refine);
1959 _updateMaxUid(cells_to_refine);
1962 CHECKPERF(m_perf_counter.stop(PerfCounter::UPDATEMAP))
1965void MeshRefinement::
1966_update(ArrayView<ItemInternal*> cells_to_refine)
1968 CHECKPERF(m_perf_counter.start(PerfCounter::UPDATEMAP))
1969 m_node_finder.updateData(cells_to_refine);
1970 m_face_finder.updateData(cells_to_refine);
1971 _updateMaxUid(cells_to_refine);
1974 CHECKPERF(m_perf_counter.stop(PerfCounter::UPDATEMAP))
1977void MeshRefinement::
1978_invalidate(ArrayView<ItemInternal*> coarsen_cells)
1980 CHECKPERF(m_perf_counter.start(PerfCounter::CLEAR))
1981 m_node_finder.clearData(coarsen_cells);
1982 m_face_finder.clearData(coarsen_cells);
1983 CHECKPERF(m_perf_counter.stop(PerfCounter::CLEAR))
1998void MeshRefinement::
2009 bool node_owner_changed =
false;
2010 bool face_owner_changed =
false;
2012 std::map<Int32, bool> marker;
2014 for (
Integer i = 0, is = cell_to_remove_lids.
size(); i < is; i++) {
2015 Cell item = cells_list[cell_to_remove_lids[i]];
2018 if (marker.find(node.localId()) != marker.end())
2021 marker[node.localId()] =
true;
2027 const Integer node_cs = node.cells().size();
2028 for (
Cell cell : node.cells()) {
2029 if (cell_to_remove_lids.contains(cell.
localId())) {
2031 if (count == node_cs)
2044 for (
Cell cell2 : node.cells()) {
2045 if (cell_to_remove_lids.contains(cell2.localId()))
2047 if (cell.null() || cell2.uniqueId() < cell.uniqueId())
2051 ARCANE_FATAL(
"Inconsistent null cell owner reference");
2052 const Int32 new_owner = cell.owner();
2053 nodes_owner[node] = new_owner;
2054 node.mutableItemBase().setOwner(new_owner, sid);
2056 node_owner_changed =
true;
2059 for (Face face : item.
faces()) {
2060 if (face.nbCell() != 2)
2062 const Int32 owner = face.owner();
2064 for (
Cell cell : face.cells()) {
2065 if ((item.
uniqueId() == cell.uniqueId()) || !(item.
level() == cell.level()))
2067 if (cell.owner() == owner) {
2073 for (
Cell cell2 : face.cells()) {
2074 if (item.
uniqueId() == cell2.uniqueId())
2076 faces_owner[face] = cell2.owner();
2077 face.mutableItemBase().setOwner(cell2.owner(), sid);
2079 face_owner_changed =
true;
2086 if (node_owner_changed) {
2088 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
2089 m_mesh->nodeFamily()->endUpdate();
2092 if (face_owner_changed) {
2093 faces_owner.synchronize();
2094 m_mesh->faceFamily()->notifyItemsOwnerChanged();
2095 m_mesh->faceFamily()->endUpdate();
2102void MeshRefinement::
2109 bool owner_changed =
false;
2111 Node node = (*inode);
2112 Int32 owner = node.owner();
2114 for (
Cell cell : node.cells()) {
2115 if (cell.owner() == owner) {
2122 for (
Cell cell2 : node.cells()) {
2123 if (cell.null() || cell2.uniqueId() < cell.uniqueId())
2126 ARCANE_ASSERT((!cell.null()), (
"Inconsistent null cell owner reference"));
2127 nodes_owner[node] = cell.owner();
2128 owner_changed =
true;
2132 if (owner_changed) {
2133 nodes_owner.synchronize();
2134 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
2135 m_mesh->nodeFamily()->endUpdate();
2142 owner_changed =
false;
2144 Face face = (*iface);
2145 Int32 owner = face.owner();
2147 for (
Cell cell : face.cells()) {
2148 if (cell.owner() == owner) {
2154 if (face.nbCell() == 2)
2155 fatal() <<
"Face" << ItemPrinter(face) <<
" has a different owner with respect to Back/Front Cells";
2157 faces_owner[face] = face.boundaryCell().owner();
2158 owner_changed =
true;
2162 if (owner_changed) {
2163 faces_owner.synchronize();
2164 m_mesh->faceFamily()->notifyItemsOwnerChanged();
2165 m_mesh->faceFamily()->endUpdate();
2171bool MeshRefinement::
2172_removeGhostChildren()
2175 DynamicMesh* mesh =
m_mesh;
2176 ItemInternalMap& cells_map = mesh->cellsMap();
2180 cells_to_remove.
reserve(1000);
2181 UniqueArray<ItemInternal*> parent_cells;
2182 parent_cells.reserve(1000);
2184 cells_map.eachItem([&](impl::ItemBase cell) {
2185 if (cell.owner() == sid)
2189 for (
Integer c = 0, cs = cell.nbHChildren(); c < cs; c++) {
2190 cells_to_remove.add(cell.hChildBase(c).localId());
2192 parent_cells.add(cell._itemInternal());
2196 _invalidate(parent_cells);
2199 _updateItemOwner(cells_to_remove);
2201 m_mesh->modifier()->removeCells(cells_to_remove,
false);
2202 for (
Integer i = 0, ps = parent_cells.size(); i < ps; i++)
2205 return cells_to_remove.size() > 0;
2211void MeshRefinement::
2212populateBackFrontCellsFromParentFaces(
Cell parent_cell)
2214 switch (parent_cell.type()) {
2218 case IT_Tetraedron4:
2224 case IT_Pentaedron6:
2239 case IT_AntiWedgeLeft6:
2242 case IT_AntiWedgeRight6:
2249 ARCANE_FATAL(
"Not supported refinement Item Type type={0}", parent_cell.type());
2260 for (
Integer c = 0; c < nb_children; c++) {
2263 for (
Integer fc = 0; fc < nb_child_faces; fc++) {
2264 if (rp.face_mapping_topo(c, fc) == 0)
2266 const Integer f = rp.face_mapping(c, fc);
2269 if (nb_cell_face == 1)
2273 if (nb_cell_subface == 1) {
2274 m_face_family->addBackFrontCellsFromParentFace(subface, face);
2278 m_face_family->replaceBackFrontCellsFromParentFace(child, subface, parent_cell, face);
2282 m_face_family->replaceBackFrontCellsFromParentFace(child, subface, parent_cell, face);
2286 ARCANE_ASSERT((subface.
backCell() != parent_cell && subface.
frontCell() != parent_cell),
2287 (
"back front cells error"));
2298 ARCANE_ASSERT((parent_cell.
isActive()), (
""));
2300 for (
Integer f = 0; f < nb_faces; f++) {
2303 if (nb_cell_face == 1)
2305 Cell neighbor_cell = (face.
cell(0) == parent_cell) ? face.
cell(1) : face.
cell(0);
2308 switch (neighbor_cell.
type()) {
2310 _populateBackFrontCellsFromChildrenFaces<IT_Quad4>(face, parent_cell, neighbor_cell);
2312 case IT_Tetraedron4:
2313 _populateBackFrontCellsFromChildrenFaces<IT_Tetraedron4>(face, parent_cell, neighbor_cell);
2316 _populateBackFrontCellsFromChildrenFaces<IT_Pyramid5>(face, parent_cell, neighbor_cell);
2318 case IT_Pentaedron6:
2319 _populateBackFrontCellsFromChildrenFaces<IT_Pentaedron6>(face, parent_cell, neighbor_cell);
2322 _populateBackFrontCellsFromChildrenFaces<IT_Hexaedron8>(face, parent_cell, neighbor_cell);
2325 _populateBackFrontCellsFromChildrenFaces<IT_HemiHexa7>(face, parent_cell, neighbor_cell);
2328 _populateBackFrontCellsFromChildrenFaces<IT_HemiHexa6>(face, parent_cell, neighbor_cell);
2331 _populateBackFrontCellsFromChildrenFaces<IT_HemiHexa5>(face, parent_cell, neighbor_cell);
2333 case IT_AntiWedgeLeft6:
2334 _populateBackFrontCellsFromChildrenFaces<IT_AntiWedgeLeft6>(face, parent_cell, neighbor_cell);
2336 case IT_AntiWedgeRight6:
2337 _populateBackFrontCellsFromChildrenFaces<IT_AntiWedgeRight6>(face, parent_cell, neighbor_cell);
2340 _populateBackFrontCellsFromChildrenFaces<IT_DiTetra5>(face, parent_cell, neighbor_cell);
2343 ARCANE_FATAL(
"Not supported refinement Item Type type={0}", neighbor_cell.
type());
2351template <
int typeID>
void MeshRefinement::
2352_populateBackFrontCellsFromChildrenFaces(
Face face,
Cell parent_cell,
2357 if (neighbor_cell.
face(f) == face) {
2359 for (
Integer c = 0; c < nb_children; c++) {
2362 for (
Integer fc = 0; fc < nb_child_faces; fc++) {
2363 if (f == rp.face_mapping(c, fc) && (rp.face_mapping_topo(c, fc))) {
2371 ARCANE_ASSERT((subface.
backCell() != subface.
frontCell()), (
"back front cells error"));
2383void MeshRefinement::
2384_checkOwner(
const String& msg)
2387 info() <<
"----CheckOwner in " << msg;
2389 syncvariable.fill(-1);
2390 bool has_owner_changed =
false;
2392 syncvariable[inode] = inode->owner();
2394 syncvariable_copy.copy(syncvariable);
2395 syncvariable.synchronize();
2396 ItemVector desync_nodes(
m_mesh->nodeFamily());
2398 if (syncvariable[inode] == -1) {
2399 debug(
Trace::Highest) <<
"----- Inconsistent owner (ghost everywhere) for node with uid : "
2400 << inode->uniqueId().asInt64();
2401 desync_nodes.addItem(*inode);
2402 has_owner_changed =
true;
2404 if (inode->isOwn() && (syncvariable_copy[inode] != syncvariable[inode])) {
2405 debug(Trace::Highest) <<
"----- Inconsistent owner (own everywhere) for node with uid : "
2406 << inode->uniqueId().asInt64();
2407 desync_nodes.addItem(*inode);
2408 has_owner_changed = true;
2418 desync_node_uids[inode.index()] = inode->uniqueId().asInt64();
2421 m_mesh->parallelMng()->allGatherVariable(desync_node_uids.view(), desync_node_uids_gather);
2423 m_mesh->nodeFamily()->itemsUniqueIdToLocalId(desync_node_lids_gather, desync_node_uids_gather,
false);
2424 for (
auto lid : desync_node_lids_gather) {
2425 if (lid == NULL_ITEM_LOCAL_ID)
2427 if (std::find(desync_nodes.viewAsArray().begin(), desync_nodes.viewAsArray().end(), lid) == desync_nodes.viewAsArray().end()) {
2428 desync_nodes.add(lid);
2435 desync_node_owners[2 * inode.index()] = inode->uniqueId().asInt64();
2436 desync_node_owners[2 * inode.index() + 1] = inode->owner();
2440 m_mesh->parallelMng()->allGatherVariable(desync_node_owners.view(), desync_node_owners_gather);
2442 std::map<Int64, Int32SharedArray> uid_owners_map;
2443 for (
Integer node_index = 0; node_index + 1 < desync_node_owners_gather.size();) {
2444 uid_owners_map[desync_node_owners_gather[node_index]].add((
Int32)desync_node_owners_gather[node_index + 1]);
2445 desync_node_uids_gather.add(desync_node_owners_gather[node_index]);
2452 for (
auto owner : uid_owners_map[inode->uniqueId().asInt64()]) {
2453 if (owner < new_owner && owner != m_node_owner_memory[inode])
2456 debug(
Trace::Highest) <<
"------ Change owner for node " << inode->uniqueId() <<
" from " << inode->owner() <<
" to " << new_owner;
2457 inode->mutableItemBase().setOwner(new_owner,
m_mesh->parallelMng()->commRank());
2458 new_owner =
m_mesh->parallelMng()->commSize() + 1;
2462 if (p_has_owner_changed) {
2463 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
2464 m_mesh->nodeFamily()->endUpdate();
2465 m_mesh->nodeFamily()->computeSynchronizeInfos();
2469 m_node_owner_memory[inode] = inode->owner();
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
Déclarations des types utilisés dans Arcane.
Integer size() const
Nombre d'éléments du vecteur.
bool empty() const
Capacité (nombre d'éléments alloués) du vecteur.
Vue modifiable d'un tableau d'un type T.
constexpr Integer size() const noexcept
Retourne la taille du tableau.
Tableau d'items de types quelconques.
ConstArrayView< T > constView() const
Vue constante sur ce tableau.
void reserve(Int64 new_capacity)
Réserve le mémoire pour new_capacity éléments.
ArrayView< T > view() const
Vue mutable sur ce tableau.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Vue sur les informations des mailles.
Classe pour convertir un CellLocalId vers une maille.
FaceConnectedListViewType faces() const
Liste des faces de la maille.
Int32 nbHChildren() const
Nombre d'enfants pour l'AMR.
Face face(Int32 i) const
i-ème face de la maille
Int32 nbFace() const
Nombre de faces de la maille.
Cell hChild(Int32 i) const
i-ème enfant AMR
bool hasHChildren() const
Int32 nbHParent() const
Nombre de parent pour l'AMR.
constexpr Integer size() const noexcept
Nombre d'éléments du tableau.
Cell frontCell() const
Maille devant la face (maille nulle si aucune).
Cell cell(Int32 i) const
i-ème maille de la face
Int32 nbCell() const
Nombre de mailles de la face (1 ou 2).
Cell backCell() const
Maille derrière la face (maille nulle si aucune).
Exception lorsqu'une erreur fatale est survenue.
Interface d'un fonctor avec argument.
Interface d'une famille d'entités.
virtual void itemsUniqueIdToLocalId(Int32ArrayView local_ids, Int64ConstArrayView unique_ids, bool do_fatal=true) const =0
Converti un tableau de numéros uniques en numéros locaux.
virtual VariableItemInt32 & itemsNewOwner()=0
Variable contenant le numéro du nouveau sous-domaine propriétaire de l'entité.
Interface du gestionnaire de parallélisme pour un sous-domaine.
virtual Int32 commRank() const =0
Rang de cette instance dans le communicateur.
virtual Int32 commSize() const =0
Nombre d'instance dans le communicateur.
virtual bool isParallel() const =0
Retourne true si l'exécution est parallèle.
virtual char reduce(eReduceType rt, char v)=0
Effectue la réduction de type rt sur le réel v et retourne la valeur.
bool isSuppressed() const
Vrai si l'entité est supprimée.
Int32 flags() const
Flags de l'entité
Int32 nbHParent() const
Nombre de parents pour l'AMR.
bool isOwn() const
Vrai si l'entité appartient au sous-domaine.
Int32 nbHChildren() const
Nombre d'enfants pour l'AMR.
Int32 localId() const
Numéro local (au sous-domaine) de l'entité
Flags pour les caractéristiques des entités.
@ II_Inactive
L'entité est inactive //COARSEN_INACTIVE,.
@ II_Refine
L'entité est marquée pour raffinement.
@ II_JustAdded
L'entité vient d'être ajoutée.
@ II_HasBackCell
L'entité a une maille derrière.
@ II_JustRefined
L'entité vient d'être raffinée.
@ II_CoarsenInactive
L'entité est inactive et a des enfants tagués pour dé-raffinement.
@ II_HasFrontCell
L'entité a une maille devant.
@ II_DoNothing
L'entité est bloquée.
@ II_Coarsen
L'entité est marquée pour dé-raffinement.
@ II_JustCoarsened
L'entité vient d'être dé-raffiné
@ II_UserMark1
Marque utilisateur.
Integer size() const
Nombre d'éléments du groupe.
Vue sur une liste pour obtenir des informations sur les entités.
Gestionnaire des types d'entités d'un maillage.
static Int32 nbHChildrenByItemType(Integer type)
AMR.
NodeConnectedListViewType nodes() const
Liste des noeuds de l'entité
Classe de base d'un élément de maillage.
impl::MutableItemBase mutableItemBase() const
Partie interne modifiable de l'entité.
constexpr Int32 localId() const
Identifiant local de l'entité dans le sous-domaine du processeur.
Int32 owner() const
Numéro du sous-domaine propriétaire de l'entité
ItemUniqueId uniqueId() const
Identifiant unique sur tous les domaines.
constexpr bool null() const
true si l'entité est nul (i.e. non connecté au maillage)
constexpr bool isOwn() const
true si l'entité est appartient au sous-domaine
impl::ItemBase itemBase() const
Partie interne de l'entité.
Int16 type() const
Type de l'entité
Interface du gestionnaire des matériaux et des milieux d'un maillage.
virtual void forceRecompute()=0
Force le recalcul des informations des matériaux.
static IMeshMaterialMng * getReference(const MeshHandleOrMesh &mesh_handle, bool create=true)
Récupère ou créé la référence associée à mesh.
void setFlags(Int32 f)
Positionne les flags de l'entité
void addFlags(Int32 added_flags)
Ajoute les flags added_flags à ceux de l'entité
void removeFlags(Int32 removed_flags)
Supprime les flags removed_flags de ceux de l'entité
Classe gérant un vecteur de réel de dimension 3.
TraceAccessor(ITraceMng *m)
Construit un accesseur via le gestionnaire de trace m.
TraceMessageDbg debug(Trace::eDebugLevel=Trace::Medium) const
Flot pour un message de debug.
TraceMessage fatal() const
Flot pour un message d'erreur fatale.
TraceMessage info() const
Flot pour un message d'information.
TraceMessage warning() const
Flot pour un message d'avertissement.
ITraceMng * traceMng() const
Gestionnaire de trace.
Vecteur 1D de données avec sémantique par valeur (style STL).
Paramètres nécessaires à la construction d'une variable.
Implementation of a mesh.
IItemFamily * nodeFamily() override
Retourne la famille des noeuds.
IItemFamily * cellFamily() override
Retourne la famille des mailles.
IParallelMng * parallelMng() override
Gestionnaire de parallèlisme.
ItemTypeMng * itemTypeMng() const override
Gestionnaire de types d'entités associé
CellGroup allCells() override
Groupe de toutes les mailles.
IItemFamily * faceFamily() override
Retourne la famille des faces.
CellGroup ownCells() override
Groupe de toutes les mailles propres au domaine.
void addFrontCellToFace(Face face, Cell new_cell)
Adds a front edge to the face.
void addBackCellToFace(Face face, Cell new_cell)
Adds a back cell to the face.
Associative array of ItemInternal.
void eachItem(const Lambda &lambda)
Template function to iterate over the instance's entities.
bool _checkUnflagged(bool arcane_assert_yes=false)
MeshRefinement(DynamicMesh *mesh)
bool m_coarsen_by_parents
AMRCallBackMng * m_call_back_mng
void populateBackFrontCellsFromChildrenFaces(Cell parent_cell)
bool coarsenItemsV2(bool update_parent_flag)
Method allowing the removal of meshes marked with the flag "II_Coarsen".
bool refineAndCoarsenItems(const bool maintain_level_one=true)
bool refineItems(const bool maintain_level_one=true)
const IMesh * getMesh() const
Constant reference to the mesh.
void uniformlyCoarsen(Integer n=1)
Int64 findOrAddFaceUid(const Real3 &face_center, const Real &tol, bool &is_added)
MapCoordToUid::Box m_mesh_containing_box
ParallelAMRConsistency * m_parallel_amr_consistency
bool _makeCoarseningCompatible(const bool)
void _updateLocalityMap()
Int64 getFirstChildNewUid()
const ItemRefinementPatternT< typeID > & getRefinementPattern() const
bool _makeRefinementCompatible(const bool)
void _upscaleData(Array< ItemInternal * > &parent_cells)
Upscaling of data on the parent meshes.
ItemRefinement * m_item_refinement
bool _makeFlagParallelConsistent()
Int64 findOrAddNodeUid(const Real3 &p, const Real &tol)
bool _checkLevelOne(bool arcane_assert_yes=false)
void uniformlyRefine(Integer n=1)
void _cleanRefinementFlags()
bool coarsenItems(const bool maintain_level_one=true)
void _populateBackFrontCellsFromParentFaces(Cell parent_cell)
void _interpolateData(const Int64Array &cells_to_refine)
Interpolation of data on the child meshes.
virtual void flagCellToRefine(Int32ConstArrayView cells_lids)
Passing the error committed by the mesh to the refinement flag.
bool _refineItems(Int64Array &cells_to_refine)
ItemGroupT< Face > FaceGroup
Groupe de faces.
ItemGroupT< Node > NodeGroup
Groupe de noeuds.
MeshVariableScalarRefT< Cell, Integer > VariableCellInteger
Grandeur au centre des mailles de type entier.
MeshVariableScalarRefT< Node, Int32 > VariableNodeInt32
Grandeur au noeud de type entier 32 bits.
ItemVariableScalarRefT< Int32 > VariableItemInt32
Grandeur de type entier 32 bits.
@ ReduceMin
Minimum des valeurs.
@ ReduceMax
Maximum des valeurs.
@ Highest
Niveau le plus élevé
Array< Int64 > Int64Array
Tableau dynamique à une dimension d'entiers 64 bits.
Integer arcaneCheckArraySize(unsigned long long size)
Vérifie que size peut être converti dans un 'Integer' pour servir de taille à un tableau....
UniqueArray< Int64 > Int64UniqueArray
Tableau dynamique à une dimension d'entiers 64 bits.
std::uint32_t UInt32
Type entier non signé sur 32 bits.
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
ConstArrayView< Int32 > Int32ConstArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
bool arcaneIsDebug()
Vrai si la macro ARCANE_DEBUG est définie.
UniqueArray< Int32 > Int32UniqueArray
Tableau dynamique à une dimension d'entiers 32 bits.
ArrayView< Int32 > Int32ArrayView
Equivalent C d'un tableau à une dimension d'entiers 32 bits.
double Real
Type représentant un réel.
@ Cell
Le maillage est AMR par maille.
std::int32_t Int32
Type entier signé sur 32 bits.