14#ifndef AMRMAXCONSISTENCYITER
15#define AMRMAXCONSISTENCYITER 10
23#include "arcane/utils/Real3.h"
24#include "arcane/utils/ArgumentException.h"
26#include "arcane/core/IParallelMng.h"
27#include "arcane/core/IMesh.h"
28#include "arcane/core/IItemFamily.h"
29#include "arcane/core/Item.h"
31#include "arcane/core/VariableTypes.h"
32#include "arcane/core/ItemPrinter.h"
33#include "arcane/core/SharedVariable.h"
34#include "arcane/core/ItemRefinementPattern.h"
35#include "arcane/core/Properties.h"
36#include "arcane/core/IGhostLayerMng.h"
37#include "arcane/core/ItemVector.h"
39#include "arcane/mesh/DynamicMesh.h"
40#include "arcane/mesh/ItemRefinement.h"
41#include "arcane/mesh/MeshRefinement.h"
42#include "arcane/mesh/ParallelAMRConsistency.h"
43#include "arcane/mesh/FaceReorienter.h"
44#include "arcane/mesh/NodeFamily.h"
45#include "arcane/mesh/EdgeFamily.h"
47#include "arcane/core/materials/IMeshMaterialMng.h"
59void _setRefineFlags(Item v)
61 Integer f = v.itemBase().flags();
62 f &= ~ItemFlags::II_Coarsen;
64 v.mutableItemBase().setFlags(f);
66void _setCoarseFlags(Item v)
68 Integer f = v.itemBase().flags();
69 f &= ~ItemFlags::II_Refine;
71 v.mutableItemBase().setFlags(f);
79#ifdef ACTIVATE_PERF_COUNTER
80const std::string MeshRefinement::PerfCounter::m_names[MeshRefinement::PerfCounter::NbCounters] =
105, m_face_family(&(
mesh->trueFaceFamily()))
111, m_face_level_mismatch_limit(1)
112, m_max_node_uid(NULL_ITEM_UNIQUE_ID)
113, m_next_node_uid(NULL_ITEM_UNIQUE_ID)
114, m_max_cell_uid(NULL_ITEM_UNIQUE_ID)
115, m_next_cell_uid(NULL_ITEM_UNIQUE_ID)
116, m_max_face_uid(NULL_ITEM_UNIQUE_ID)
117, m_next_face_uid(NULL_ITEM_UNIQUE_ID)
118, m_max_nb_hChildren(0)
125 m_need_update = true ;
129#ifdef ACTIVATE_PERF_COUNTER
130 m_perf_counter.init() ;
153 CHECKPERF( m_perf_counter.start(PerfCounter::CLEAR) )
154 m_node_finder._clear();
155 m_face_finder._clear();
156 CHECKPERF( m_perf_counter.stop(PerfCounter::CLEAR) )
166 CHECKPERF( m_perf_counter.start(PerfCounter::INIT) )
169 Int64 max_node_uid = 0;
172 const Node& node = *inode;
174 if (uid>max_node_uid)
181 m_max_node_uid = max_node_uid;
182 info() <<
"NODE_UID_INFO: MY_MAX_UID=" << max_node_uid <<
" GLOBAL=" << m_max_node_uid;
183 m_next_node_uid = m_max_node_uid + 1 +
m_mesh->parallelMng()->commRank();
188 Int64 max_cell_uid = 0;
192 const Cell& cell = *icell;
195 if (uid>max_cell_uid)
197 if (nb_hChildren>max_nb_hChildren)
198 max_nb_hChildren = nb_hChildren;
208 m_max_cell_uid = max_cell_uid;
209 m_max_nb_hChildren = max_nb_hChildren;
211 info() <<
"CELL_UID_INFO: MY_MAX_UID=" << max_cell_uid <<
" GLOBAL=" << m_max_cell_uid;
212 m_next_cell_uid = m_max_cell_uid + 1 + pm->
commRank() * m_max_nb_hChildren;
216 Int64 max_face_uid = 0;
219 const Face& face = *iface;
221 if (uid>max_face_uid)
228 m_max_face_uid = max_face_uid;
229 info() <<
"FACE_UID_INFO: MY_MAX_UID=" << max_face_uid <<
" GLOBAL=" << m_max_face_uid;
230 m_next_face_uid = m_max_face_uid + 1 + pm->
commRank();
235 CHECKPERF( m_perf_counter.stop(PerfCounter::INIT) )
243 CHECKPERF( m_perf_counter.start(PerfCounter::INIT) )
248 Int64 max_node_uid = m_max_node_uid;
249 Int64 max_cell_uid = m_max_cell_uid;
250 Integer max_nb_hChildren = m_max_nb_hChildren;
251 Int64 max_face_uid = m_max_face_uid;
253 typedef std::set<Int64> set_type ;
254 typedef std::pair<set_type::iterator,bool> insert_return_type ;
258 Cell cell = cells[icell];
265 if (cell_uid>max_cell_uid)
266 max_cell_uid = cell_uid;
267 if (nb_hChildren>max_nb_hChildren)
268 max_nb_hChildren = nb_hChildren;
272 const Int64 uid = inode.uniqueId();
273 insert_return_type value = node_list.insert(uid) ;
275 if (uid>max_node_uid)
282 for( Face iface : child.
faces() ){
283 const Int64 uid = iface.uniqueId();
284 insert_return_type value = face_list.insert(uid) ;
286 if (uid>max_face_uid)
303 m_max_node_uid = max_node_uid;
304 m_max_cell_uid = max_cell_uid;
305 m_max_nb_hChildren = max_nb_hChildren;
306 m_max_face_uid = max_face_uid;
308 m_next_node_uid = m_max_node_uid + 1 +
m_mesh->parallelMng()->commRank();
309 m_next_cell_uid = m_max_cell_uid + 1 + pm->
commRank() * m_max_nb_hChildren;
310 m_next_face_uid = m_max_face_uid + 1 + pm->
commRank();
313 CHECKPERF( m_perf_counter.stop(PerfCounter::INIT) )
318MeshRefinement::initMeshContainingBox()
327MeshRefinement::update()
330 initMeshContainingBox() ;
332 m_node_finder.init() ;
334 m_face_finder.initFaceCenter() ;
335 m_face_finder.init() ;
338 m_need_update = false ;
347 for (
Integer i = 0, is = lids.
size(); i < is; i++) {
348 Item item = cells[lids[i]];
361 for (
Integer i = 0, is = lids.
size(); i < is; i++) {
362 Item item = cells[lids[i]];
374 CHECKPERF( m_perf_counter.start(PerfCounter::INIT) )
376 bool _maintain_level_one = maintain_level_one;
379 if (!maintain_level_one)
381 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
384 _maintain_level_one = m_face_level_mismatch_limit;
387 if (_maintain_level_one){
393 CHECKPERF( m_perf_counter.stop(PerfCounter::INIT) )
398 if (
m_mesh->parallelMng()->isParallel())
401 CHECKPERF( m_perf_counter.start(PerfCounter::CONSIST) )
407 bool satisfied =
false;
412 satisfied = (coarsening_satisfied && refinement_satisfied);
414 bool max_satisfied = satisfied,min_satisfied = satisfied;
417 ARCANE_ASSERT ( (satisfied == max_satisfied), (
"parallel max_satisfied failed"));
418 ARCANE_ASSERT ( (satisfied == min_satisfied), (
"parallel min_satisfied failed"));
420 }
while (!satisfied);
422 }
while (
m_mesh->parallelMng()->isParallel() && !this->_makeFlagParallelConsistent() && iter<10 );
423 if(iter==AMRMAXCONSISTENCYITER)
fatal()<<
" MAX CONSISTENCY ITER REACHED";
424 CHECKPERF( m_perf_counter.stop(PerfCounter::CONSIST) )
427 CHECKPERF( m_perf_counter.start(PerfCounter::COARSEN) )
429 CHECKPERF( m_perf_counter.stop(PerfCounter::COARSEN) )
434 const bool refining_changed_mesh = this->
_refineItems(cells_to_refine);
437 if (refining_changed_mesh || coarsening_changed_mesh) {
438 bool do_compact =
m_mesh->properties()->getBool(
"compact");
439 m_mesh->properties()->setBool(
"compact",
true) ;
442 CHECKPERF( m_perf_counter.start(PerfCounter::ENDUPDATE) )
443 m_mesh->modifier()->endUpdate();
444 m_mesh->properties()->setBool(
"compact",do_compact) ;
445 CHECKPERF( m_perf_counter.stop(PerfCounter::ENDUPDATE) )
449 if (coarsening_changed_mesh)
453 CHECKPERF( m_perf_counter.start(PerfCounter::CONTRACT) )
455 CHECKPERF( m_perf_counter.stop(PerfCounter::CONTRACT) )
457 CHECKPERF( m_perf_counter.start(PerfCounter::ENDUPDATE) )
458 m_mesh->properties()->setBool(
"compact",
true) ;
459 m_mesh->modifier()->endUpdate();
460 m_mesh->properties()->setBool(
"compact",do_compact) ;
461 CHECKPERF( m_perf_counter.stop(PerfCounter::ENDUPDATE) )
466 CHECKPERF( m_perf_counter.start(PerfCounter::INTERP) )
468 CHECKPERF( m_perf_counter.stop(PerfCounter::INTERP) )
471 if (!coarsening_changed_mesh &&
m_mesh->parallelMng()->isParallel())
472 this->_makeFlagParallelConsistent2();
474 if (
m_mesh->parallelMng()->isParallel())
476 CHECKPERF( m_perf_counter.start(PerfCounter::PGHOST) )
477 m_mesh->modifier()->setDynamic(
true);
480 m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine,
481 ghost_cell_to_coarsen,
483 _update(ghost_cell_to_refine) ;
484 CHECKPERF( m_perf_counter.stop(PerfCounter::PGHOST) )
485 _checkOwner(
"refineAndCoarsenItems after ghost update");
499#ifdef ACTIVATE_PERF_COUNTER
500 info()<<
"MESH REFINEMENT PERF INFO" ;
501 m_perf_counter.printInfo(
info().file()) ;
502 info()<<
"NODE FINDER PERF INFO" ;
503 m_node_finder.getPerfCounter().printInfo(
info().file()) ;
504 info()<<
"FACE FINDER PERF INFO" ;
505 m_face_finder.getPerfCounter().printInfo(
info().file()) ;
506 info()<<
"PARALLEL AMR CONSISTENCY PERF INFO" ;
523 bool _maintain_level_one = maintain_level_one;
526 if (!maintain_level_one){
527 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
530 _maintain_level_one = m_face_level_mismatch_limit;
533 if (_maintain_level_one){
534 ARCANE_ASSERT((
_checkLevelOne(
true)), (
"check_level_one failed"));
543 if (
m_mesh->parallelMng()->isParallel())
550 bool satisfied =
false;
554 satisfied = coarsening_satisfied;
556 bool max_satisfied = satisfied, min_satisfied = satisfied;
559 ARCANE_ASSERT ( (satisfied == max_satisfied), (
"parallel max_satisfied failed"));
560 ARCANE_ASSERT ( (satisfied == min_satisfied), (
"parallel min_satisfied failed"));
562 }
while (!satisfied);
563 }
while (
m_mesh->parallelMng()->isParallel() && !this->_makeFlagParallelConsistent());
576 _checkOwner(
"coarsenItems");
601 if (cell.
level() == 0) {
608 if (update_parent_flag) {
619 ARCANE_FATAL(
"Parent cannot have children with coarse flag and children without coarse flag -- Parent uid: {0} -- Child uid: {1}", parent.
uniqueId(), child.
uniqueId());
627 ARCANE_FATAL(
"Cannot coarse parent and child in same time");
630 ARCANE_FATAL(
"For now, cannot coarse cell with children");
643 if (
m_mesh->parallelMng()->isParallel()) {
644 bool has_ghost_layer =
m_mesh->ghostLayerMng()->nbGhostLayer() != 0;
650 Cell other_cell = face.oppositeCell(cell);
653 if (other_cell.
null()) {
667 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());
674 face.mutableItemBase().setOwner(other_cell.
owner(), cell.
owner());
683 bool will_deleted =
true;
684 for (
Cell cell2 : node.cells()) {
686 will_deleted =
false;
697 Integer node_owner = node.owner();
699 bool need_new_owner =
true;
700 for (
Cell cell2 : node.cells()) {
702 if (cell2.owner() == node_owner) {
703 need_new_owner =
false;
706 new_owner = cell2.owner();
709 if (!need_new_owner) {
715 node.mutableItemBase().setOwner(new_owner, cell.
owner());
722 if (!has_ghost_layer) {
724 ARCANE_NOT_YET_IMPLEMENTED(
"Support des maillages sans mailles fantômes à faire");
730 m_mesh->modifier()->removeCells(to_coarse);
731 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
732 m_mesh->faceFamily()->notifyItemsOwnerChanged();
733 m_mesh->modifier()->endUpdate();
734 m_mesh->cellFamily()->computeSynchronizeInfos();
735 m_mesh->nodeFamily()->computeSynchronizeInfos();
736 m_mesh->faceFamily()->computeSynchronizeInfos();
737 m_mesh->modifier()->setDynamic(
true);
742 if (!update_parent_flag) {
750 m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine, ghost_cell_to_coarsen,
true);
763 bool _maintain_level_one = maintain_level_one;
766 if (!maintain_level_one)
768 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
771 _maintain_level_one = m_face_level_mismatch_limit;
773 if (_maintain_level_one){
774 ARCANE_ASSERT((
_checkLevelOne(
true)), (
"check_level_one failed"));
782 if (
m_mesh->parallelMng()->isParallel())
789 bool satisfied =
false;
793 satisfied = refinement_satisfied;
795 bool max_satisfied = satisfied,min_satisfied = satisfied;
798 ARCANE_ASSERT ( (satisfied == max_satisfied), (
"parallel max_satisfied failed"));
799 ARCANE_ASSERT ( (satisfied == min_satisfied), (
"parallel min_satisfied failed"));
801 }
while (!satisfied);
802 }
while (
m_mesh->parallelMng()->isParallel() && !this->_makeFlagParallelConsistent());
807 const bool mesh_changed = this->
_refineItems(cells_to_refine);
812 bool do_compact =
m_mesh->properties()->getBool(
"compact");
813 m_mesh->properties()->setBool(
"compact",
true) ;
814 m_mesh->modifier()->endUpdate();
815 m_mesh->properties()->setBool(
"compact",do_compact) ;
821 m_mesh->modifier()->setDynamic(
true);
824 m_mesh->modifier()->updateGhostLayerFromParent(ghost_cell_to_refine,ghost_cell_to_coarsen,
false);
825 _update(ghost_cell_to_refine) ;
844 for (
Integer rstep = 0; rstep < n; rstep++){
852 _setRefineFlags(cell);
857 warning() <<
"ATTENTION: No Data Projection 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) ;
874 for (
Integer rstep = 0; rstep < n; rstep++){
882 _setCoarseFlags(cell);
889 warning() <<
"ATTENTION: No Data Restriction with this method!";
893 bool do_compact =
m_mesh->properties()->getBool(
"compact");
894 m_mesh->properties()->setBool(
"compact",
true) ;
895 m_mesh->modifier()->endUpdate();
896 m_mesh->properties()->setBool(
"compact",do_compact) ;
909 Int64 uid = m_node_finder.find(p, tol);
910 if (uid != NULL_ITEM_ID)
916 Int64 new_uid = m_next_node_uid;
917 m_node_finder.insert(p, new_uid,tol);
918 m_next_node_uid +=
m_mesh->parallelMng()->commSize() + 1;
932 Int64 uid = m_face_finder.find(p, tol);
933 if (uid != NULL_ITEM_ID)
941 Int64 new_uid = m_next_face_uid;
942 m_face_finder.insert(p, new_uid,tol);
943 m_next_face_uid +=
m_mesh->parallelMng()->commSize() + 1;
955 Int64 new_uid = m_next_cell_uid;
956 Int64 comm_size =
m_mesh->parallelMng()->commSize();
957 m_next_cell_uid += comm_size * m_max_nb_hChildren;
973 m_node_finder.check() ;
975 m_face_finder.check() ;
976 debug() <<
"[MeshRefinement::updateLocalityMap] done";
998 bool failure =
false;
1006 if (face.nbCell()!=2)
1008 Cell back_cell = face.backCell();
1009 Cell front_cell = face.frontCell();
1012 Cell neighbor = (back_cell==cell)?front_cell:back_cell;
1029 if (arcane_assert_pass)
1042 bool found_flag =
false;
1047 const Cell cell = *icell;
1060 if (arcane_assert_pass)
1073 if (!
m_mesh->parallelMng()->isParallel())
1076 CHECKPERF( m_perf_counter.start(PerfCounter::PCONSIST) )
1077 debug() <<
"makeFlagsParallelConsistent() begin";
1078 bool parallel_consistent =
true;
1086 flag_cells_consistent[icell] = f;
1089 ghost_cells.
add(cell);
1091 flag_cells_consistent.synchronize();
1093 for(
Integer icell=0, nb_cell=ghost_cells.
size();icell<nb_cell;++icell) {
1094 Item iitem = ghost_cells[icell];
1102 const Integer g = flag_cells_consistent[
Cell(iitem)];
1107 parallel_consistent =
false;
1113 parallel_consistent =
false;
1119 parallel_consistent =
false;
1125 parallel_consistent =
false;
1152 debug() <<
"makeFlagsParallelConsistent() end -- parallel_consistent : " << parallel_consistent;
1154 CHECKPERF( m_perf_counter.stop(PerfCounter::PCONSIST) )
1155 return parallel_consistent;
1161_makeFlagParallelConsistent2()
1166 CHECKPERF( m_perf_counter.start(PerfCounter::PCONSIST2) )
1167 debug() <<
"makeFlagsParallelConsistent2() begin";
1168 bool parallel_consistent =
true;
1177 flag_cells_consistent[icell] = f;
1180 ghost_cells.
add(cell);
1182 flag_cells_consistent.synchronize();
1184 for(
Integer icell=0, nb_cell=ghost_cells.
size();icell<nb_cell;++icell) {
1188 Item iitem = ghost_cells[icell];
1189 Integer f = iitem.itemBase().flags();
1193 Integer g = flag_cells_consistent[Cell(iitem)];
1197 iitem.mutableItemBase().setFlags(f);
1198 parallel_consistent =
false;
1203 iitem.mutableItemBase().setFlags(f);
1204 parallel_consistent =
false;
1209 iitem.mutableItemBase().setFlags(f);
1210 parallel_consistent =
false;
1222 debug() <<
"makeFlagsParallelConsistent2() end";
1224 CHECKPERF( m_perf_counter.stop(PerfCounter::PCONSIST2) )
1225 return parallel_consistent;
1235 debug() <<
"makeCoarseningCompatible() begin";
1237 bool _maintain_level_one = maintain_level_one;
1240 if (!maintain_level_one){
1241 warning() <<
"Warning, level one rule is the only condition accepted for AMR!";
1244 _maintain_level_one = m_face_level_mismatch_limit;
1248 bool level_one_satisfied =
true;
1252 bool compatible_with_refinement =
true;
1262 const Cell cell = *icell;
1263 max_level = std::max(max_level, cell.
level());
1274 if (max_level == 0){
1275 debug() <<
"makeCoarseningCompatible() done";
1280 return compatible_with_refinement;
1290 if (_maintain_level_one)
1293 repeat: level_one_satisfied =
true;
1297 level_one_satisfied =
true;
1302 bool my_flag_changed =
false;
1307 if (face.nbCell()!=2)
1309 Cell back_cell = face.backCell();
1310 Cell front_cell = face.frontCell();
1313 Cell neighbor = (back_cell==cell)?front_cell:back_cell;
1320 if ((neighbor.
level() == my_level) &&
1325 my_flag_changed =
true;
1337 my_flag_changed =
true;
1346 if (my_flag_changed)
1347 level_one_satisfied =
false;
1353 if (my_flag_changed &&
m_mesh->parallelMng()->isParallel())
1355 if (face.nbCell()!=2)
1357 Cell back_cell = face.backCell();
1358 Cell front_cell = face.frontCell();
1361 Cell neighbor = (back_cell==cell)?front_cell:back_cell;
1363 if (neighbor.
owner() != sid){
1364 compatible_with_refinement =
false;
1372 compatible_with_refinement =
false;
1379 while (!level_one_satisfied);
1389 for (
int level=(max_level); level >= 0; level--){
1392 const Cell cell = *icell;
1397 bool is_a_candidate =
true;
1398 bool found_remote_child =
false;
1402 if (child.
owner() != sid)
1403 found_remote_child =
true;
1405 is_a_candidate =
false;
1408 if (!is_a_candidate && !found_remote_child){
1412 if (child.
owner() != sid)
1415 level_one_satisfied =
false;
1426 if (!level_one_satisfied && _maintain_level_one)
goto repeat;
1431 const Cell cell = *icell;
1436 bool all_children_flagged_for_coarsening =
true;
1437 bool found_remote_child =
false;
1441 if (child.
owner() != sid)
1442 found_remote_child =
true;
1444 all_children_flagged_for_coarsening =
false;
1448 if (!found_remote_child && all_children_flagged_for_coarsening)
1453 else if (!found_remote_child)
1461 debug() <<
"makeCoarseningCompatible() done";
1466 return compatible_with_refinement;
1477 debug() <<
"makeRefinementCompatible() begin";
1479 bool _maintain_level_one = maintain_level_one;
1482 if (!maintain_level_one){
1483 warning() <<
"Warning, level one rule is the only condition accepted now for AMR!";
1486 _maintain_level_one = m_face_level_mismatch_limit;
1490 bool level_one_satisfied =
true;
1494 bool compatible_with_coarsening =
true;
1499 if (_maintain_level_one){
1501 level_one_satisfied =
true;
1504 const Cell cell = *icell;
1509 bool refinable =
true;
1512 if (face.nbCell()!=2)
1514 Cell back_cell = face.backCell();
1515 Cell front_cell = face.frontCell();
1518 Cell neighbor = (back_cell==cell)?front_cell:back_cell;
1529 if ( ( (neighbor.
level()+1) == my_level) &&
1541 if (face.nbCell()!=2)
1543 Cell back_cell = face.backCell();
1544 Cell front_cell = face.frontCell();
1547 Cell neighbor = (back_cell==cell)?front_cell:back_cell;
1555 if (neighbor.
level() == my_level){
1564 compatible_with_coarsening =
false;
1565 level_one_satisfied =
false;
1576 else if ((neighbor.
level()+1) == my_level) {
1585 compatible_with_coarsening =
false;
1586 level_one_satisfied =
false;
1593 else if ((neighbor.
level()+1) < my_level)
1595 fatal() <<
"a neighbor is more than one level away";
1604 fatal() <<
"serious problem: we should never get here";
1612 while (!level_one_satisfied);
1618 debug() <<
"makeRefinementCompatible() done";
1620 return compatible_with_coarsening;
1630 debug() <<
"[MeshRefinement::_coarsenItems] begin"<<
m_mesh->allNodes().size();
1632 bool mesh_changed =
false;
1645 ARCANE_ASSERT ( (cell.
level() != 0), (
"no level-0 element should be active and flagged for coarsening"));
1662 mesh_changed =
true;
1666 switch (cell.
type())
1671 case IT_Tetraedron4:
1677 case IT_Pentaedron6:
1692 case IT_AntiWedgeLeft6:
1695 case IT_AntiWedgeRight6:
1702 ARCANE_FATAL(
"Not supported refinement Item Type type={0}",iitem.type());
1704 ARCANE_ASSERT(cell.
isActive(), (
"cell_active failed"));
1707 mesh_changed =
true;
1722 debug() <<
"[MeshRefinement::_coarsenItems()] done "<<
m_mesh->allNodes().size();
1724 return mesh_changed;
1736 debug() <<
"[MeshRefinement::_refineItems]"<<
m_mesh->allNodes().size();
1738 m_node_finder.check() ;
1739 m_face_finder.check() ;
1741 CHECKPERF( m_perf_counter.start(PerfCounter::REFINE) )
1742 m_face_finder.clearNewUids() ;
1751 cell_to_refine_internals.
add(cell);
1754 debug() <<
"[MeshRefinement::_refineItems] " << cell_to_refine_uids.
size() <<
" flagged cells for refinement";
1769 const Int32 i_size = cell_to_refine_internals.
size();
1770 for (
Integer e = 0; e != i_size; ++e) {
1771 Cell iitem = cell_to_refine_internals[e];
1773 switch (iitem.
type())
1778 case IT_Tetraedron4:
1784 case IT_Pentaedron6:
1799 case IT_AntiWedgeLeft6:
1802 case IT_AntiWedgeRight6:
1809 ARCANE_FATAL(
"Not supported refinement Item Type type={0}",iitem.type());
1814 bool mesh_changed = !(i_size == 0);
1821 for (
Integer e = 0; e != i_size; ++e){
1822 Cell i_hParent_cell = cell_to_refine_internals[e];
1823 populateBackFrontCellsFromParentFaces(i_hParent_cell);
1826 CHECKPERF( m_perf_counter.stop(PerfCounter::REFINE) )
1827 if (mesh_changed &&
m_mesh->parallelMng()->isParallel())
1829 CHECKPERF( m_perf_counter.start(PerfCounter::PGCONSIST) )
1831 m_node_finder.check2() ;
1832 m_face_finder.check2() ;
1837 CHECKPERF( m_perf_counter.stop(PerfCounter::PGCONSIST) )
1840 debug() <<
"[MeshRefinement::_refineItems] done"<<
m_mesh->allNodes().size();
1842 return mesh_changed;
1855 Integer f = mutable_cell.flags();
1858 mutable_cell.setFlags(f);
1862 mutable_cell.setFlags(f);
1868 mutable_cell.setFlags(f);
1873 mutable_cell.setFlags(f);
1878 mutable_cell.setFlags(f);
1883 mutable_cell.setFlags(f);
1898 bool mesh_changed =
false;
1901 cells_map.
eachItem([&](impl::ItemBase item) {
1909 std::set < Int32 > cells_to_remove_set;
1912 cells_map.
eachItem([&](impl::ItemBase iitem) {
1919 ARCANE_ASSERT((iitem.
nbHParent() != 0), (
""));
1920 cells_to_remove_set.insert(iitem.
localId());
1922 mesh_changed =
true;
1927 bool active_parent =
false;
1929 impl::ItemBase ichild = iitem.hChildBase(c);
1933 cells_to_remove_set.insert(ichild.
localId());
1935 active_parent =
true;
1939 parent_cells.
add(iitem._itemInternal());
1943 mesh_changed =
true;
1952 std::copy(std::begin(cells_to_remove_set), std::end(cells_to_remove_set),std::begin(cell_lids));
1954 if (
m_mesh->parallelMng()->isParallel()){
1955 this->_makeFlagParallelConsistent2();
1956 this->_removeGhostChildren();
1957 this->_updateItemOwner(cell_lids);
1958 m_mesh->parallelMng()->barrier();
1960 if (cell_lids.
size() > 0){
1962 _invalidate(parent_cells);
1964 m_mesh->modifier()->removeCells(cell_lids,
false);
1966 for (
Integer i = 0; i < ps; i++)
1970 mesh_changed =
false;
1972 return mesh_changed;
1978void MeshRefinement::
1987void MeshRefinement::
1999 const Int32 nb_cells = cells_to_refine.
size();
2005 for (
Integer i = 0; i < nb_cells; i++) {
2006 cells_to_refine_internals[i] = ItemCompatibility::_itemInternal(internals[lids[i]]);
2008 m_call_back_mng->callCallBacks(cells_to_refine_internals, Prolongation);
2009 _update(cells_to_refine_internals);
2012void MeshRefinement::
2015 CHECKPERF( m_perf_counter.start(PerfCounter::UPDATEMAP) )
2016 const Int32 nb_cells = cells_to_refine_uids.
size();
2021 for (
Integer i = 0; i < nb_cells; i++) {
2022 cells_to_refine[i] = ItemCompatibility::_itemInternal(internals[lids[i]]);
2024 m_node_finder.updateData(cells_to_refine);
2025 m_face_finder.updateData(cells_to_refine);
2026 _updateMaxUid(cells_to_refine);
2029 CHECKPERF( m_perf_counter.stop(PerfCounter::UPDATEMAP) )
2032void MeshRefinement::
2033_update(ArrayView<ItemInternal*> cells_to_refine)
2035 CHECKPERF( m_perf_counter.start(PerfCounter::UPDATEMAP) )
2036 m_node_finder.updateData(cells_to_refine) ;
2037 m_face_finder.updateData(cells_to_refine) ;
2038 _updateMaxUid(cells_to_refine) ;
2041 CHECKPERF( m_perf_counter.stop(PerfCounter::UPDATEMAP) )
2044void MeshRefinement::
2045_invalidate(ArrayView<ItemInternal*> coarsen_cells)
2047 CHECKPERF( m_perf_counter.start(PerfCounter::CLEAR) )
2048 m_node_finder.clearData(coarsen_cells) ;
2049 m_face_finder.clearData(coarsen_cells) ;
2050 CHECKPERF( m_perf_counter.stop(PerfCounter::CLEAR) )
2065void MeshRefinement::
2076 bool node_owner_changed =
false;
2077 bool face_owner_changed =
false;
2079 std::map<Int32, bool> marker;
2081 for (
Integer i = 0, is = cell_to_remove_lids.
size(); i < is; i++){
2082 Cell item = cells_list[cell_to_remove_lids[i]];
2085 if (marker.find(node.localId()) != marker.end())
2088 marker[node.localId()] =
true;
2094 const Integer node_cs = node.cells().size();
2095 for (
Cell cell : node.cells() ){
2096 if (cell_to_remove_lids.contains(cell.
localId())){
2098 if (count == node_cs)
2111 for ( Cell cell2 : node.cells() ){
2112 if (cell_to_remove_lids.contains(cell2.localId()))
2114 if (cell.null() || cell2.uniqueId() < cell.uniqueId())
2118 ARCANE_FATAL(
"Inconsistent null cell owner reference");
2119 const Int32 new_owner = cell.owner();
2120 nodes_owner[node] = new_owner;
2121 node.mutableItemBase().setOwner(new_owner, sid);
2123 node_owner_changed =
true;
2126 for ( Face face : item.
faces() ){
2127 if (face.nbCell() != 2)
2129 const Int32 owner = face.owner();
2131 for (Cell cell : face.cells() ){
2132 if ((item.
uniqueId() == cell.uniqueId()) || !(item.
level() == cell.level()))
2134 if (cell.owner() == owner){
2140 for (Cell cell2 : face.cells()){
2141 if (item.
uniqueId() == cell2.uniqueId())
2143 faces_owner[face] = cell2.owner();
2144 face.mutableItemBase().setOwner(cell2.owner(), sid);
2146 face_owner_changed =
true;
2153 if (node_owner_changed){
2155 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
2156 m_mesh->nodeFamily()->endUpdate();
2159 if (face_owner_changed){
2160 faces_owner.synchronize();
2161 m_mesh->faceFamily()->notifyItemsOwnerChanged();
2162 m_mesh->faceFamily()->endUpdate();
2169void MeshRefinement::
2176 bool owner_changed =
false;
2178 Node node = (*inode);
2179 Int32 owner = node.owner();
2181 for( Cell cell : node.cells() ){
2182 if (cell.owner()==owner){
2189 for( Cell cell2 : node.cells() ){
2190 if (cell.null() || cell2.uniqueId() < cell.uniqueId())
2193 ARCANE_ASSERT((!cell.null()),(
"Inconsistent null cell owner reference"));
2194 nodes_owner[node] = cell.owner();
2195 owner_changed =
true;
2200 nodes_owner.synchronize();
2201 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
2202 m_mesh->nodeFamily()->endUpdate();
2209 owner_changed =
false;
2211 Face face = (*iface);
2212 Int32 owner = face.owner();
2214 for( Cell cell : face.cells() ){
2215 if (cell.owner()==owner){
2221 if(face.nbCell() ==2)
2222 fatal() <<
"Face" << ItemPrinter(face) <<
" has a different owner with respect to Back/Front Cells";
2224 faces_owner[face] = face.boundaryCell().owner();
2230 faces_owner.synchronize();
2231 m_mesh->faceFamily()->notifyItemsOwnerChanged();
2232 m_mesh->faceFamily()->endUpdate();
2238bool MeshRefinement::
2239_removeGhostChildren()
2242 DynamicMesh* mesh =
m_mesh;
2243 ItemInternalMap& cells_map = mesh->cellsMap();
2247 cells_to_remove.
reserve(1000);
2248 UniqueArray<ItemInternal*> parent_cells;
2249 parent_cells.reserve(1000);
2251 cells_map.eachItem([&](impl::ItemBase cell) {
2252 if (cell.owner() == sid)
2256 for (
Integer c = 0, cs = cell.nbHChildren(); c < cs; c++) {
2257 cells_to_remove.add(cell.hChildBase(c).localId());
2259 parent_cells.add(cell._itemInternal());
2263 _invalidate(parent_cells) ;
2266 _updateItemOwner(cells_to_remove);
2268 m_mesh->modifier()->removeCells(cells_to_remove,
false);
2269 for (
Integer i = 0, ps = parent_cells.size(); i < ps; i++)
2272 return cells_to_remove.size() > 0 ;
2278void MeshRefinement::
2279populateBackFrontCellsFromParentFaces(Cell parent_cell)
2281 switch (parent_cell.type())
2286 case IT_Tetraedron4:
2292 case IT_Pentaedron6:
2307 case IT_AntiWedgeLeft6:
2310 case IT_AntiWedgeRight6:
2317 ARCANE_FATAL(
"Not supported refinement Item Type type={0}",parent_cell.type());
2328 for (
Integer c = 0; c < nb_children; c++){
2331 for (
Integer fc = 0; fc < nb_child_faces; fc++){
2332 if (rp.face_mapping_topo(c, fc) == 0)
2334 const Integer f = rp.face_mapping(c, fc);
2337 if (nb_cell_face == 1)
2341 if (nb_cell_subface == 1){
2342 m_face_family->addBackFrontCellsFromParentFace(subface, face);
2346 m_face_family->replaceBackFrontCellsFromParentFace(child, subface, parent_cell, face);
2350 m_face_family->replaceBackFrontCellsFromParentFace(child, subface, parent_cell, face);
2354 ARCANE_ASSERT((subface.
backCell() != parent_cell && subface.
frontCell() != parent_cell),
2355 (
"back front cells error"));
2366 ARCANE_ASSERT((parent_cell.
isActive()), (
""));
2368 for (
Integer f = 0; f < nb_faces; f++){
2371 if (nb_cell_face == 1)
2373 Cell neighbor_cell = (face.
cell(0) == parent_cell) ? face.
cell(1) : face.
cell(0);
2376 switch (neighbor_cell.
type()){
2378 _populateBackFrontCellsFromChildrenFaces<IT_Quad4>(face, parent_cell, neighbor_cell);
2380 case IT_Tetraedron4:
2381 _populateBackFrontCellsFromChildrenFaces<IT_Tetraedron4>(face, parent_cell, neighbor_cell);
2384 _populateBackFrontCellsFromChildrenFaces<IT_Pyramid5>(face, parent_cell, neighbor_cell);
2386 case IT_Pentaedron6:
2387 _populateBackFrontCellsFromChildrenFaces<IT_Pentaedron6>(face, parent_cell, neighbor_cell);
2390 _populateBackFrontCellsFromChildrenFaces<IT_Hexaedron8>(face, parent_cell, neighbor_cell);
2393 _populateBackFrontCellsFromChildrenFaces<IT_HemiHexa7>(face, parent_cell, neighbor_cell);
2396 _populateBackFrontCellsFromChildrenFaces<IT_HemiHexa6>(face, parent_cell, neighbor_cell);
2399 _populateBackFrontCellsFromChildrenFaces<IT_HemiHexa5>(face, parent_cell, neighbor_cell);
2401 case IT_AntiWedgeLeft6:
2402 _populateBackFrontCellsFromChildrenFaces<IT_AntiWedgeLeft6>(face, parent_cell, neighbor_cell);
2404 case IT_AntiWedgeRight6:
2405 _populateBackFrontCellsFromChildrenFaces<IT_AntiWedgeRight6>(face, parent_cell, neighbor_cell);
2408 _populateBackFrontCellsFromChildrenFaces<IT_DiTetra5>(face, parent_cell, neighbor_cell);
2411 ARCANE_FATAL(
"Not supported refinement Item Type type={0}",neighbor_cell.
type());
2419template <
int typeID>
void MeshRefinement::
2420_populateBackFrontCellsFromChildrenFaces(
Face face,
Cell parent_cell,
2425 if (neighbor_cell.
face(f) == face){
2427 for (
Integer c = 0; c < nb_children; c++){
2430 for (
Integer fc = 0; fc < nb_child_faces; fc++){
2431 if (f == rp.face_mapping(c, fc) && (rp.face_mapping_topo(c, fc))){
2439 ARCANE_ASSERT((subface.
backCell() != subface.
frontCell()), (
"back front cells error"));
2451void MeshRefinement::
2452_checkOwner(
const String& msg)
2455 info() <<
"----CheckOwner in " << msg;
2457 syncvariable.fill(-1);
2458 bool has_owner_changed =
false;
2461 syncvariable_copy.copy(syncvariable);
2462 syncvariable.synchronize();
2463 ItemVector desync_nodes(
m_mesh->nodeFamily());
2466 if (syncvariable[inode] == -1) {
2467 debug(
Trace::Highest) <<
"----- Inconsistent owner (ghost everywhere) for node with uid : "
2468 << inode->uniqueId().asInt64();
2469 desync_nodes.addItem(*inode);
2470 has_owner_changed =
true;
2472 if (inode->isOwn() && (syncvariable_copy[inode] != syncvariable[inode])) {
2473 debug(Trace::Highest) <<
"----- Inconsistent owner (own everywhere) for node with uid : "
2474 << inode->uniqueId().asInt64();
2475 desync_nodes.addItem(*inode);
2476 has_owner_changed = true;
2486 desync_node_uids[inode.index()] = inode->uniqueId().asInt64();
2489 m_mesh->parallelMng()->allGatherVariable(desync_node_uids.view(),desync_node_uids_gather);
2491 m_mesh->nodeFamily()->itemsUniqueIdToLocalId(desync_node_lids_gather,desync_node_uids_gather,
false);
2492 for (
auto lid : desync_node_lids_gather) {
2493 if (lid == NULL_ITEM_LOCAL_ID)
2495 if (std::find(desync_nodes.viewAsArray().begin(), desync_nodes.viewAsArray().end(),lid) == desync_nodes.viewAsArray().end()){
2496 desync_nodes.add(lid);
2503 desync_node_owners[2*inode.index() ] = inode->uniqueId().asInt64();
2504 desync_node_owners[2*inode.index()+1] = inode->owner();
2508 m_mesh->parallelMng()->allGatherVariable(desync_node_owners.view(),desync_node_owners_gather);
2510 std::map<Int64,Int32SharedArray> uid_owners_map;
2511 for (
Integer node_index = 0; node_index+1 < desync_node_owners_gather.size();) {
2512 uid_owners_map[desync_node_owners_gather[node_index]].add((
Int32)desync_node_owners_gather[node_index+1]);
2513 desync_node_uids_gather.add(desync_node_owners_gather[node_index]);
2520 for (
auto owner : uid_owners_map[inode->uniqueId().asInt64()]) {
2521 if (owner < new_owner && owner != m_node_owner_memory[inode]) new_owner = owner;
2523 debug(
Trace::Highest) <<
"------ Change owner for node " << inode->uniqueId() <<
" from " << inode->owner() <<
" to " << new_owner;
2524 inode->mutableItemBase().setOwner(new_owner,
m_mesh->parallelMng()->commRank());
2525 new_owner =
m_mesh->parallelMng()->commSize()+1;
2529 if (p_has_owner_changed) {
2530 m_mesh->nodeFamily()->notifyItemsOwnerChanged();
2531 m_mesh->nodeFamily()->endUpdate();
2532 m_mesh->nodeFamily()->computeSynchronizeInfos();
#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 old_value 1<<24.
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 de 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.
bool isOwn() const
true si l'entité est appartient au sous-domaine
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)
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 \added_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.
Implémentation d'un maillage.
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)
Ajoute une maille devant la face.
void addBackCellToFace(Face face, Cell new_cell)
Ajoute une maille derrière la face.
Tableau associatif de ItemInternal.
void eachItem(const Lambda &lambda)
Fonction template pour itérer sur les entités de l'instance.
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)
Méthode permettant de retirer les mailles marquées avec le flag "II_Coarsen".
bool refineAndCoarsenItems(const bool maintain_level_one=true)
bool refineItems(const bool maintain_level_one=true)
const IMesh * getMesh() const
Référence constante au maillage.
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)
restriction des données sur les mailles parents
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 des données sur les mailles enfants
virtual void flagCellToRefine(Int32ConstArrayView cells_lids)
Passage de l'erreur commise par maille au flag de raffinement.
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.
std::int32_t Int32
Type entier signé sur 32 bits.