87 info() <<
"#subdivide mesh";
99 Int32
my_rank = mesh->parallelMng()->commRank();
102 debug() <<
"PART 3D";
103 mesh->utilities()->writeToFile(
"3D_last_input"+std::to_string(
my_rank)+
".vtk",
"VtkLegacyMeshWriter");
107 Int32 version =
gm->builderVersion();
109 gm->setBuilderVersion(3);
110 gm->setNbGhostLayer(0);
162 ARCANE_ASSERT((mesh->nbEdge() == 0 ),(
"Wrong number of edge"));
206 Integer
new_nodes_on_edges_couple[][2] = {{0, 1},{0, 3},{0, 4},{1, 2},{1, 5},{2, 3},{2, 6},{3, 7},{4, 5},{4, 7},{5, 6},{6, 7}};
208 for( Integer i = 0 ; i < 12 ; i++ ){
226 ARCANE_ASSERT((
index_27 == 20),(
"wrong number"));
237 for( Integer i = 0 ; i < 6 ; i++ ){
244 std::sort(
tmp.begin(),
tmp.end());
245 Int64
nuid = Arcane::MeshUtils::generateHashUniqueId(
tmp.constView());
254 ARCANE_ASSERT((
index_27 == 26),(
"wrong number"));
274 for( Integer i = 0 ; i < 8 ; i++ ){
282 for( Integer i = 8 ; i < 27 ; i++){
313 for( Integer i = 0 ; i < 12 ; i++ ){
315 std::sort(
tmp.begin(),
tmp.end());
316 Int64
uidface = Arcane::MeshUtils::generateHashUniqueId(
tmp.constView());
335 const Int64 faces[][4] = {
362 for(Integer i = 0 ; i < 24 ; i++){
364 std::sort(
tmp.begin(),
tmp.end());
365 Int64
uidface = Arcane::MeshUtils::generateHashUniqueId(
tmp.constView());
383 {0, 8, 20, 9, 10, 21, 26, 22 },
384 {10, 21, 26, 22, 4, 16, 25, 17 },
385 {8, 1, 11, 20, 21, 12, 23, 26 },
386 {21, 12, 23, 26, 16, 5, 18, 25 },
387 {9, 20, 13, 3, 22, 26, 24, 15 },
388 {22, 26, 24, 15, 17, 25, 19, 7 },
389 {20, 11, 2, 13, 26, 23, 14, 24 },
390 {26, 23, 14, 24, 25, 18, 6, 19 }
395 for( Integer i = 0 ; i < 8 ; i++ ){
399 for( Integer
j = 0 ;
j < 8 ;
j++){
402 std::sort(
tmp.begin(),
tmp.end());
403 Int64 cell_uid = Arcane::MeshUtils::generateHashUniqueId(
tmp.constView());
444 mesh->modifier()->endUpdate();
452 mesh->cellFamily()->notifyItemsOwnerChanged();
462 gm2->setNbGhostLayer(1);
463 mesh->updateGhostLayers(
true);
469 auto it = std::min_element(node.
cells().begin(),node.
cells().end());
470 Cell cell = node.
cell(
static_cast<Int32
>(std::distance(node.
cells().begin(),
it)));
478 auto it = std::min_element(face.
cells().begin(),face.
cells().end());
479 Cell cell = face.
cell(
static_cast<Int32
>(std::distance(face.
cells().begin(),
it)));
484 gm2->setNbGhostLayer(0);
485 mesh->updateGhostLayers(
true);
492 mesh->nodeFamily()->notifyItemsOwnerChanged();
499 mesh->faceFamily()->notifyItemsOwnerChanged();
502 mesh->utilities()->writeToFile(
"3Drefined"+std::to_string(
my_rank)+
".vtk",
"VtkLegacyMeshWriter");
503 info() <<
"Writing VTK 3Drefine" ;
504 debug() <<
"END 3D fun" ;
511 ARCANE_ASSERT((mesh->nbCell() ==
nb_cell_init*8 ),(
"Wrong number of cell added"));