14#include "arcane/utils/StringBuilder.h"
16#include "arcane/core/IGhostLayerMng.h"
17#include "arcane/core/IItemFamily.h"
18#include "arcane/core/IMesh.h"
19#include "arcane/core/IMeshFactoryMng.h"
20#include "arcane/core/IMeshMng.h"
21#include "arcane/core/IMeshModifier.h"
22#include "arcane/core/IPrimaryMesh.h"
23#include "arcane/core/MeshBuildInfo.h"
24#include "arcane/core/IMeshSection.h"
25#include "arcane/core/IVariableMng.h"
26#include "arcane/core/VariableMetaData.h"
28#include "arcane/core/internal/IVariableInternal.h"
29#include "arcane/core/internal/IVariableMngInternal.h"
31#include "arcane/std/MeshCut_axl.h"
53 NodeOnEdge(
const Node first_node,
const Node second_node)
55 const Int64 a = first_node.uniqueId();
56 const Int64 b = second_node.uniqueId();
59 m_node1 = second_node;
64 m_node0 = second_node;
71 NodeOnEdge(
Int64 first_node,
Int64 second_node)
73 if (first_node < second_node) {
74 m_uid_node0 = first_node;
75 m_uid_node1 = second_node;
78 m_uid_node0 = second_node;
79 m_uid_node1 = first_node;
83 NodeOnEdge() =
default;
85 bool operator<(
const NodeOnEdge& other)
const
87 if (m_uid_node0 != other.m_uid_node0) {
88 return m_uid_node0 < other.m_uid_node0;
90 return m_uid_node1 < other.m_uid_node1;
93 bool operator==(
const NodeOnEdge& other)
const
95 return m_uid_node0 == other.m_uid_node0 && m_uid_node1 == other.m_uid_node1;
101 Int64 m_uid_node0 = -1;
102 Int64 m_uid_node1 = -1;
104 Int64 m_uid_new_node = -1;
105 Int32 m_owner_new_node = -1;
116 FaceLite(
const Ref<NodeOnEdge>& node0,
const Ref<NodeOnEdge>& node1)
117 : m_node0(node0->m_uid_node0 < node1->m_uid_node0 ? node0 : node1)
118 , m_node1(node0->m_uid_node0 < node1->m_uid_node0 ? node1 : node0)
120 const Int64 node00 = node0->m_uid_node0;
121 const Int64 node01 = node0->m_uid_node1;
122 const Int64 node10 = node1->m_uid_node0;
123 const Int64 node11 = node1->m_uid_node1;
125 if (node00 < node10) {
129 else if (node00 > node10) {
134 if (node01 == node11) {
137 if (node01 < node11) {
148 bool operator<(
const FaceLite& other)
const
150 return m_node0->operator<(*(other.m_node0.get())) || (m_node0->operator==(*(other.m_node0.get())) && m_node1->operator<(*(other.m_node1.get())));
153 bool operator==(
const FaceLite& other)
const
155 return m_node0->operator==(*(other.m_node0.get())) && m_node1->operator==(*(other.m_node1.get()));
158 Ref<NodeOnEdge> m_node0;
159 Ref<NodeOnEdge> m_node1;
161 Int64 m_uid_new_face = -1;
162 Int32 m_owner_new_face = -1;
171struct NodeIntersection
173 NodeIntersection(
const Node first_node,
const Node second_node,
const Real3& intersection_pos)
174 : m_new_node(
makeRef(new NodeOnEdge(first_node, second_node)))
175 , m_intersection_pos(intersection_pos)
178 NodeIntersection(
Int64 first_node,
Int64 second_node,
const Real3& intersection_pos)
179 : m_new_node(
makeRef(new NodeOnEdge(first_node, second_node)))
180 , m_intersection_pos(intersection_pos)
183 NodeIntersection() =
default;
185 bool operator<(
const NodeIntersection& other)
const
187 return m_new_node->operator<(*(other.m_new_node.get()));
190 bool operator==(
const NodeIntersection& other)
const
192 return m_new_node->operator==(*(other.m_new_node.get()));
195 Ref<NodeOnEdge> m_new_node;
196 Real3 m_intersection_pos{ -1 };
202struct UnknownNodeOrFace
204 UnknownNodeOrFace(
Int64 node0_uid,
Int64 node1_uid,
Int32 who) : m_node0_uid(node0_uid), m_node1_uid(node1_uid), m_who(who){}
205 bool null()
const {
return m_who == -1;}
206 bool operator==(
const UnknownNodeOrFace& other)
const{
return m_node0_uid == other.m_node0_uid && m_node1_uid == other.m_node1_uid;}
221 UniqueArray<ArrayView<T>> dim1;
222 UniqueArray<Array2View<T>> dim2;
226struct VariableGroupType
228 bool isUnknownUsed() {
return !(unknown.dim1.empty() && unknown.dim2.empty()); }
229 bool isCellsUsed() {
return !(cells.dim1.empty() && cells.dim2.empty()); }
230 bool isFacesUsed() {
return !(faces.dim1.empty() && faces.dim2.empty()); }
231 bool isNodesUsed() {
return !(nodes.dim1.empty() && nodes.dim2.empty()); }
233 VariableGroup<T> unknown;
234 VariableGroup<T> cells;
235 VariableGroup<T> faces;
236 VariableGroup<T> nodes;
240struct VariableOriClone
242 VariableGroupType<T> ori;
243 VariableGroupType<T> clone;
284 return m_cloned_mesh->handle();
290 void _createVariables();
313 void _updateArrayVariable(
UniqueArray<Cell>& ori_cells, T, VariableOriClone<T>& voc);
322 Int32 m_mesh_uid = -1;
328ARCANE_REGISTER_SERVICE_MESHCUT(MeshCut, MeshCutService);
357 m_mesh_uid = unique_id;
366 return m_variables_cloned;
375 if (
mesh()->ghostLayerMng()->nbGhostLayer() < 1) {
376 ARCANE_FATAL(
"A ghost layer is required for this service");
388 if (m_cloned_mesh !=
nullptr) {
392 if (mesh()->dimension() != 3) {
396 IMeshMng* mm = subDomain()->meshMng();
398 if (m_mesh_uid == -1) {
400 m_mesh_uid =
options()->getUniqueIdServiceMesh();
407 String service_mesh_name = mesh()->name() +
"_MeshCut" + m_mesh_uid;
409 MeshHandle* mesh_handle = mm->findMeshHandle(service_mesh_name,
false);
411 if (mesh_handle ==
nullptr) {
412 IParallelMng* pm = subDomain()->parallelMng();
413 MeshBuildInfo mbi(service_mesh_name);
417 mbi.addParallelMng(
makeRef(pm));
418 m_cloned_mesh = mm->meshFactoryMng()->createMesh(mbi);
419 m_cloned_mesh->modifier()->setDynamic(
true);
420 m_cloned_mesh->setDimension(2);
421 m_cloned_mesh->endAllocate();
424 m_cloned_mesh = mesh_handle->mesh()->toPrimaryMesh();
425 m_cloned_mesh->modifier()->clearItems();
436 IVariableMng* variable_mng = m_cloned_mesh->variableMng();
437 for (VariableCollection::Enumerator i(m_variables_ori); ++i;) {
439 Ref vmd(var->createMetaDataRef());
440 const String& mesh_name = vmd->meshName();
441 if (mesh_name.null()) {
442 ARCANE_FATAL(
"Only variables with support are supported.");
444 if (vmd->isPartial()) {
447 const String& full_type = vmd->fullType();
448 const String& base_name = vmd->baseName();
449 Integer property = vmd->property();
450 const String& family_name = vmd->itemFamilyName();
454 VariableBuildInfo vbi(m_cloned_mesh, base_name, family_name, property);
455 VariableRef* variable_ref = variable_mng->_internalApi()->createVariableFromType(full_type, vbi);
458 m_variables_cloned.add(variable_ref->variable());
468 auto [p0, normal] = m_plans[plan_pos];
470 const Int32 mesh_dim = mesh()->dimension();
475 UniqueArray<Int32> face_already_computed;
488 UniqueArray<NodeIntersection> point_coords_tmp;
493 bool has_face_on_plane =
false;
495 bool cell_useful =
true;
496 Int32 nb_node_on_plane = 0;
501 bool has_neg =
false;
502 bool has_pos =
false;
503 for (Node node : cell.nodes()) {
504 Real d = node_dist[node];
515 if (!(has_neg && has_pos))
523 if (nb_node_on_plane >= mesh_dim) {
524 for (Face face : cell.faces()) {
528 if (face.nbNode() != nb_node_on_plane)
531 bool has_egal =
true;
532 for (Node node : face.nodes()) {
533 if (node_dist[node] != 0) {
543 if (face_already_computed.contains(face.localId())) {
552 face_already_computed.add(face.localId());
553 for (Node node : face.nodes()) {
554 auto ni = NodeIntersection{ node, node, node_coord[node] };
555 point_coords_tmp.add(ni);
557 has_face_on_plane =
true;
568 if (!has_face_on_plane) {
572 static constexpr Integer edges_tetraedron4[6][2] = {
573 { 0, 1 }, { 0, 2 }, { 0, 3 }, { 1, 2 }, { 1, 3 }, { 2, 3 }
575 static constexpr Integer edges_pyramid5[8][2] = {
576 { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }, { 0, 4 }, { 1, 4 }, { 2, 4 }, { 3, 4 }
578 static constexpr Integer edges_pentaedron6[9][2] = {
579 { 0, 1 }, { 1, 2 }, { 2, 0 }, { 0, 3 }, { 1, 4 }, { 2, 5 }, { 3, 4 }, { 4, 5 }, { 5, 3 }
581 static constexpr Integer edges_hexaedron8[12][2] = {
582 { 0, 1 }, { 1, 2 }, { 2, 3 }, { 3, 0 }, { 0, 4 }, { 1, 5 }, { 2, 6 }, { 3, 7 }, { 4, 5 }, { 5, 6 }, { 6, 7 }, { 7, 4 }
586 const Integer(*edge_def)[2] =
nullptr;
588 auto type = cell.itemTypeId();
590 if (type == ITI_Tetraedron4) {
592 edge_def = edges_tetraedron4;
594 else if (type == ITI_Pyramid5) {
596 edge_def = edges_pyramid5;
598 else if (type == ITI_Pentaedron6) {
600 edge_def = edges_pentaedron6;
602 else if (type == ITI_Hexaedron8) {
604 edge_def = edges_hexaedron8;
608 ARCANE_FATAL(
"Cell type not supported -- type: {0}", type);
612 for (
Integer i = 0; i < nb_edges; ++i) {
613 Node node0 = cell.node(edge_def[i][0]);
614 Node node1 = cell.node(edge_def[i][1]);
616 bool need_compute_intersection =
true;
619 if (node_dist[node0] == 0) {
620 const Real3 p = node_coord[node0];
622 auto ni = NodeIntersection{ node0, node0, p };
624 if (!point_coords_tmp.contains(ni)) {
625 point_coords_tmp.add(ni);
627 need_compute_intersection =
false;
631 if (node_dist[node1] == 0) {
632 const Real3 p = node_coord[node1];
634 auto ni = NodeIntersection{ node1, node1, p };
636 if (!point_coords_tmp.contains(ni)) {
637 point_coords_tmp.add(ni);
639 need_compute_intersection =
false;
643 if (need_compute_intersection && node_dist[node0] * node_dist[node1] < 0) {
647 Real t = std::abs(node_dist[node0]) / (std::abs(node_dist[node0]) + std::abs(node_dist[node1]));
651 p.x = node_coord[node0].x + t * (node_coord[node1].x - node_coord[node0].x);
652 p.y = node_coord[node0].y + t * (node_coord[node1].y - node_coord[node0].y);
653 p.z = node_coord[node0].z + t * (node_coord[node1].z - node_coord[node0].z);
655 auto ni = NodeIntersection{ node0, node1, p };
657 if (!point_coords_tmp.contains(ni)) {
658 point_coords_tmp.add(ni);
665 if (point_coords_tmp.size() >= mesh_dim) {
668 if (point_coords_tmp.size() > 6)
669 ARCANE_FATAL(
"Pas implem : {0}", point_coords_tmp.size());
671 new_cells.add(point_coords_tmp.size());
672 new_cells.add(sd_nb_cell);
678 for (
const auto& node : point_coords_tmp) {
679 bary += node.m_intersection_pos;
681 bary /= point_coords_tmp.size();
685 const Real3 arbitrary = (std::abs(normal.x) > 0.9) ? Real3{ 0.0, 1.0, 0.0 } : Real3{ 1.0, 0.0, 0.0 };
693 UniqueArray<Int64> indices;
694 indices.reserve(point_coords_tmp.size());
695 for (
Int64 i = 0; i < point_coords_tmp.size(); ++i) {
699 std::sort(indices.begin(), indices.end(),
701 const Real3& pa = point_coords_tmp[ia].m_intersection_pos;
702 const Real3& pb = point_coords_tmp[ib].m_intersection_pos;
705 const Real3 va{ pa - bary };
706 const Real3 vb{ pb - bary };
716 const Real angle_a = std::atan2(a_y, a_x);
717 const Real angle_b = std::atan2(b_y, b_x);
719 return angle_a < angle_b;
728 for (
Int64& idx : indices) {
730 std::optional<Int64> pos = new_nodes.span().findFirst(point_coords_tmp[idx]);
736 new_cells.add(
static_cast<Int32>(pos.value()) + ajust_node_pos);
741 NodeIntersection& elem = point_coords_tmp[idx];
744 if (elem.m_new_node->m_node0.owner() == elem.m_new_node->m_node1.owner()) {
745 elem.m_new_node->m_owner_new_node = elem.m_new_node->m_node0.owner();
751 if (elem.m_new_node->m_node0.isOwn()) {
752 elem.m_new_node->m_uid_new_node = sd_nb_node++;
756 elem.m_new_node->m_uid_new_node = -2;
759 new_cells.add(new_nodes.size() + ajust_node_pos);
760 idx = new_nodes.size();
766 Int64 idxm1 = indices[indices.size() - 1];
767 for (
Int64 idx : indices) {
768 FaceLite fl(new_nodes[idx].m_new_node, new_nodes[idxm1].m_new_node);
769 if (!new_faces.contains(fl)) {
777 if (new_nodes[idx].m_new_node->m_owner_new_node == new_nodes[idxm1].m_new_node->m_owner_new_node) {
778 fl.m_owner_new_face = new_nodes[idx].m_new_node->m_owner_new_node;
779 if (fl.m_owner_new_face == subDomain()->subDomainId()) {
780 fl.m_uid_new_face = sd_nb_face++;
783 fl.m_uid_new_face = -2;
793 point_coords_tmp.clear();
801_makeUniqueCellUID(Int32 sd_nb_cell, UniqueArray<Int64>& new_cells, UniqueArray<NodeIntersection>& new_nodes)
803 IParallelMng* pm = subDomain()->parallelMng();
805 Int32 decal = sd_nb_cell;
806 pm->scan(MessagePassing::ReduceSum, ArrayView{ 1, &decal });
819 while (pos0 < new_cells.size()) {
820 Int64 type = new_cells[pos0++];
821 new_cells[pos0++] += decal;
823 for (Int32 i = 0; i < type; ++i) {
824 Int64& pos_to_uid = new_cells[pos0++];
825 pos_to_uid = new_nodes[pos_to_uid].m_new_node->m_uid_new_node;
835_fillNodeUID(Int32& sd_nb_node, UniqueArray<NodeIntersection>& new_nodes)
845 IParallelMng* pm = subDomain()->parallelMng();
846 Int32 my_proc = pm->commRank();
847 UniqueArray<UniqueArray<Ref<NodeOnEdge>>> requested_nodes(subDomain()->nbSubDomain());
908 UniqueArray<UniqueArray<Int64>> request_uid(subDomain()->nbSubDomain());
910 debug() <<
"[Node][" << my_proc <<
"] Step 1";
912 for (
auto& elem : new_nodes) {
914 if (elem.m_new_node->m_uid_new_node >= 0) {
919 if (elem.m_new_node->m_owner_new_node < 0) {
921 Node node0 = elem.m_new_node->m_node0;
922 Node node1 = elem.m_new_node->m_node1;
928 Int64 min_uid = INT64_MAX;
929 Int32 owner_min = -1;
930 for (Cell cell0 : node0.cells()) {
931 for (Cell cell1 : node1.cells()) {
932 if (cell0 == cell1) {
933 if (cell0.uniqueId() < min_uid) {
934 min_uid = cell0.uniqueId();
935 owner_min = cell0.owner();
942 if (owner_min == subDomain()->subDomainId()) {
943 elem.m_new_node->m_owner_new_node = subDomain()->subDomainId();
944 elem.m_new_node->m_uid_new_node = sd_nb_node++;
954 elem.m_new_node->m_owner_new_node = owner_min;
955 elem.m_new_node->m_uid_new_node = -2;
961 request_uid[elem.m_new_node->m_owner_new_node].add(elem.m_new_node->m_uid_node0);
962 request_uid[elem.m_new_node->m_owner_new_node].add(elem.m_new_node->m_uid_node1);
964 requested_nodes[elem.m_new_node->m_owner_new_node].add(elem.m_new_node);
974 request_uid[elem.m_new_node->m_owner_new_node].add(elem.m_new_node->m_uid_node0);
975 request_uid[elem.m_new_node->m_owner_new_node].add(elem.m_new_node->m_uid_node1);
977 requested_nodes[elem.m_new_node->m_owner_new_node].add(elem.m_new_node);
987 UniqueArray<Parallel::Request> requests(subDomain()->nbSubDomain() * 2);
989 debug() <<
"[Node][" << my_proc <<
"] Step 1.2";
991 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
992 if (sr == subDomain()->subDomainId()) {
995 Int32 size = request_uid[sr].size();
996 requests[sr * 2] = pm->send(ArrayView{ 1, &size }, sr,
false);
997 requests[sr * 2 + 1] = pm->send(request_uid[sr], sr,
false);
1001 pm->waitAllRequests(requests);
1072 UniqueArray<UniqueArray<Int64>> answers_uid(subDomain()->nbSubDomain());
1074 UniqueArray<UnknownNodeOrFace> unknown_node;
1075 debug() <<
"[Node][" << my_proc <<
"] Step 2";
1077 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1078 if (sr == subDomain()->subDomainId()) {
1082 pm->recv(ArrayView{ 1, &size }, sr);
1084 UniqueArray<Int64> requested_uid(size);
1085 pm->recv(requested_uid, sr);
1088 answers_uid[sr].add(0);
1091 for (Int32 ipair_uid = 0; ipair_uid < requested_uid.size(); ipair_uid += 2) {
1093 std::optional<Int64> pos = new_nodes.span().findFirst(NodeIntersection{ requested_uid[ipair_uid], requested_uid[ipair_uid + 1], Real3{ 0 } });
1095 answers_uid[sr].add(new_nodes[pos.value()].m_new_node->m_uid_new_node);
1109 answers_uid[sr].add(-1);
1110 unknown_node.add({ requested_uid[ipair_uid], requested_uid[ipair_uid + 1], sr });
1116 answers_uid[sr][0] = answers_uid[sr].size() - 1;
1119 UniqueArray<Int64> who;
1120 debug() <<
"[Node][" << my_proc <<
"] Step 2.2";
1126 for (Int32 i = 0; i < unknown_node.size(); ++i) {
1127 if (unknown_node[i].null())
1130 who.add(unknown_node[i].m_who);
1131 unknown_node[i].m_who = -1;
1132 for (Int32 j = i + 1; j < unknown_node.size(); ++j) {
1133 if (unknown_node[j].null())
1135 if (unknown_node[j] == unknown_node[i]) {
1136 who.add(unknown_node[j].m_who);
1137 unknown_node[j].m_who = -1;
1141 for (
auto proc : who) {
1142 answers_uid[proc].add(unknown_node[i].m_node0_uid);
1143 answers_uid[proc].add(unknown_node[i].m_node1_uid);
1144 answers_uid[proc].add(who.size());
1145 answers_uid[proc].addRange(who);
1151 UniqueArray<Parallel::Request> requests(subDomain()->nbSubDomain() * 2);
1154 debug() <<
"[Node][" << my_proc <<
"] Step 2.3";
1155 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1156 if (sr == subDomain()->subDomainId()) {
1160 Int32 size = answers_uid[sr].size();
1161 requests[sr * 2] = pm->send(ArrayView{ 1, &size }, sr,
false);
1162 requests[sr * 2 + 1] = pm->send(answers_uid[sr], sr,
false);
1167 pm->waitAllRequests(requests);
1286 UniqueArray<UniqueArray<Int64>> request_uid(subDomain()->nbSubDomain());
1287 UniqueArray<UniqueArray<Ref<NodeOnEdge>>> requested_nodes2(subDomain()->nbSubDomain());
1290 debug() <<
"[Node][" << my_proc <<
"] Step 3";
1293 bool need_more_comm =
false;
1295 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1296 if (sr == subDomain()->subDomainId()) {
1300 Int32 total_size = 0;
1301 pm->recv(ArrayView{ 1, &total_size }, sr);
1303 UniqueArray<Int64> answered_uid(total_size);
1304 pm->recv(answered_uid, sr);
1306 if (total_size == 1) {
1310 Int32 answer_to_request_size =
static_cast<Int32
>(answered_uid[0]);
1312 Span<Int64> answer_to_request = answered_uid.subView(1, answer_to_request_size);
1313 Span<Int64> additionnal_answer = answered_uid.subView(answer_to_request_size+1, answered_uid.size() - (answer_to_request_size+1));
1320 for (Int32 answer = 0; answer < answer_to_request.size(); ++answer) {
1321 Ref<NodeOnEdge> node_on_edge = requested_nodes[sr][answer];
1323 if (answer_to_request[answer] != -1) {
1324 node_on_edge->m_uid_new_node = answer_to_request[answer];
1332 while (pos < additionnal_answer.size()) {
1333 Int64& uid0 = additionnal_answer[pos++];
1334 Int64 uid1 = additionnal_answer[pos++];
1335 Int64 decal = additionnal_answer[pos++];
1336 if (uid0 == node_on_edge->m_uid_node0 && uid1 == node_on_edge->m_uid_node1) {
1342 if (pos >= additionnal_answer.size()) {
1343 ARCANE_FATAL(
"Unknown node -- UID0 : {0} -- UID1 : {1}", node_on_edge->m_uid_node0, node_on_edge->m_uid_node1);
1349 Span<Int64> sub_additionnal_answer;
1351 while (pos < additionnal_answer.size()) {
1352 Int64 pos_node_in_array = additionnal_answer[pos++];
1354 Int64 decal = additionnal_answer[pos++];
1356 Ref<NodeOnEdge> node_on_edge = requested_nodes[sr][pos_node_in_array];
1357 sub_additionnal_answer = additionnal_answer.subSpan(pos, decal);
1364 Node node0 = node_on_edge->m_node0;
1365 Node node1 = node_on_edge->m_node1;
1371 Int64 min_uid = INT64_MAX;
1372 Int32 owner_min = -1;
1373 for (Cell cell0 : node0.cells()) {
1374 for (Cell cell1 : node1.cells()) {
1375 if (cell0 == cell1) {
1376 if (cell0.uniqueId() < min_uid && sub_additionnal_answer.contains(cell0.owner())) {
1377 min_uid = cell0.uniqueId();
1378 owner_min = cell0.owner();
1385 if (owner_min == subDomain()->subDomainId()) {
1386 node_on_edge->m_owner_new_node = subDomain()->subDomainId();
1387 node_on_edge->m_uid_new_node = sd_nb_node++;
1390 if (sub_additionnal_answer.size() > 1) {
1391 need_more_comm =
true;
1399 for (
auto proc : sub_additionnal_answer) {
1400 if (proc == my_proc)
1402 request_uid[proc].add(node_on_edge->m_uid_new_node);
1408 else if (owner_min >= 0) {
1409 need_more_comm =
true;
1410 node_on_edge->m_owner_new_node = owner_min;
1411 node_on_edge->m_uid_new_node = -2;
1413 if (request_uid[my_proc].empty()) {
1414 request_uid[my_proc].resize(subDomain()->nbSubDomain(), 0);
1417 request_uid[my_proc][owner_min]++;
1419 requested_nodes2[owner_min].add(node_on_edge);
1435 if (need_more_comm) {
1437 UniqueArray<Parallel::Request> requests(subDomain()->nbSubDomain());
1440 debug() <<
"[Node][" << my_proc <<
"] Step 3.2";
1442 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1443 if (sr == subDomain()->subDomainId()) {
1447 if (request_uid[sr].empty())
continue;
1448 requests[sr] = pm->send(request_uid[sr], sr,
false);
1452 pm->waitAllRequests(requests);
1467 if (!request_uid[my_proc].empty()) {
1469 debug() <<
"[Node][" << my_proc <<
"] Step 4";
1471 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1472 if (sr == subDomain()->subDomainId()) {
1476 Int64 size = request_uid[my_proc][sr];
1477 if (size == 0)
continue;
1482 UniqueArray<Int64> requested_uid(size);
1483 pm->recv(requested_uid, sr);
1485 for (Int32 i = 0; i < size; ++i) {
1486 Ref<NodeOnEdge> node_on_edge = requested_nodes2[sr][i];
1487 node_on_edge->m_uid_new_node = requested_uid[i];
1501Int32 MeshCutService::
1502_makeUniqueNodeUID(Int32 sd_nb_node, UniqueArray<NodeIntersection>& new_nodes)
1504 IParallelMng* pm = subDomain()->parallelMng();
1506 UniqueArray<Int32> all_nb_node(pm->commSize());
1507 pm->allGather(ArrayView{ 1, &sd_nb_node }, all_nb_node);
1510 for (
auto& elem : all_nb_node) {
1511 const Int32 old = elem;
1518 for (
auto& elem : new_nodes) {
1519 elem.m_new_node->m_uid_new_node += all_nb_node[elem.m_new_node->m_owner_new_node];
1527void MeshCutService::
1528_fillFaceUID(Int32& sd_nb_face, UniqueArray<FaceLite>& new_faces)
1531 IParallelMng* pm = subDomain()->parallelMng();
1532 Int32 my_proc = pm->commRank();
1533 UniqueArray<UniqueArray<Int32>> requested_faces(subDomain()->nbSubDomain());
1537 UniqueArray<UniqueArray<Int64>> request_uid(subDomain()->nbSubDomain());
1539 debug() <<
"[Face][" << my_proc <<
"] Step 1";
1541 for (
auto& elem : new_faces) {
1543 if (elem.m_uid_new_face >= 0) {
1546 if (elem.m_owner_new_face < 0) {
1548 Node node00 = elem.m_node0->m_node0;
1549 Node node01 = elem.m_node0->m_node1;
1550 Node node10 = elem.m_node1->m_node0;
1551 Node node11 = elem.m_node1->m_node1;
1553 Int64 min_uid = INT64_MAX;
1554 Int32 owner_min = -1;
1557 for (Cell cell00 : node00.cells()) {
1558 for (Cell cell01 : node01.cells()) {
1559 if (cell00 == cell01) {
1560 for (Cell cell10 : node10.cells()) {
1561 if (cell01 == cell10) {
1562 for (Cell cell11 : node11.cells()) {
1563 if (cell10 == cell11) {
1564 if (cell11.uniqueId() < min_uid) {
1565 min_uid = cell11.uniqueId();
1566 owner_min = cell11.owner();
1576 if (owner_min == subDomain()->subDomainId()) {
1577 elem.m_owner_new_face = subDomain()->subDomainId();
1578 elem.m_uid_new_face = sd_nb_face++;
1586 elem.m_owner_new_face = owner_min;
1587 elem.m_uid_new_face = -2;
1588 request_uid[elem.m_owner_new_face].add(elem.m_node0->m_uid_new_node);
1589 request_uid[elem.m_owner_new_face].add(elem.m_node1->m_uid_new_node);
1591 requested_faces[elem.m_owner_new_face].add(iter);
1599 request_uid[elem.m_owner_new_face].add(elem.m_node0->m_uid_new_node);
1600 request_uid[elem.m_owner_new_face].add(elem.m_node1->m_uid_new_node);
1602 requested_faces[elem.m_owner_new_face].add(iter);
1611 UniqueArray<Parallel::Request> requests(subDomain()->nbSubDomain() * 2);
1614 debug() <<
"[Face][" << my_proc <<
"] Step 1.2";
1616 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1617 if (sr == subDomain()->subDomainId()) {
1620 Int32 size = request_uid[sr].size();
1621 requests[sr * 2] = pm->send(ArrayView{ 1, &size }, sr,
false);
1622 requests[sr * 2 + 1] = pm->send(request_uid[sr], sr,
false);
1626 pm->waitAllRequests(requests);
1631 UniqueArray<UniqueArray<Int64>> answers_uid(subDomain()->nbSubDomain());
1633 UniqueArray<UnknownNodeOrFace> unknown_face;
1634 debug() <<
"[Face][" << my_proc <<
"] Step 2";
1636 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1637 if (sr == subDomain()->subDomainId()) {
1641 pm->recv(ArrayView{ 1, &size }, sr);
1643 UniqueArray<Int64> requested_uid(size);
1644 pm->recv(requested_uid, sr);
1646 answers_uid[sr].add(0);
1648 for (Int32 ipair_uid = 0; ipair_uid < requested_uid.size(); ipair_uid += 2) {
1649 std::optional<Int64> pos = _find(new_faces, requested_uid[ipair_uid], requested_uid[ipair_uid + 1]);
1651 answers_uid[sr].add(new_faces[pos.value()].m_uid_new_face);
1665 answers_uid[sr].add(-1);
1666 unknown_face.add({ requested_uid[ipair_uid], requested_uid[ipair_uid + 1], sr });
1672 answers_uid[sr][0] = answers_uid[sr].size() - 1;
1675 UniqueArray<Int64> who;
1676 debug() <<
"[Face][" << my_proc <<
"] Step 2.2";
1678 for (Int32 i = 0; i < unknown_face.size(); ++i) {
1679 if (unknown_face[i].null())
1682 who.add(unknown_face[i].m_who);
1683 unknown_face[i].m_who = -1;
1684 for (Int32 j = i + 1; j < unknown_face.size(); ++j) {
1685 if (unknown_face[j].null())
1687 if (unknown_face[j] == unknown_face[i]) {
1688 who.add(unknown_face[j].m_who);
1689 unknown_face[j].m_who = -1;
1693 for (
auto proc : who) {
1694 answers_uid[proc].add(unknown_face[i].m_node0_uid);
1695 answers_uid[proc].add(unknown_face[i].m_node1_uid);
1696 answers_uid[proc].add(who.size());
1697 answers_uid[proc].addRange(who);
1703 UniqueArray<Parallel::Request> requests(subDomain()->nbSubDomain() * 2);
1706 debug() <<
"[Face][" << my_proc <<
"] Step 2.3";
1707 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1708 if (sr == subDomain()->subDomainId()) {
1712 Int32 size = answers_uid[sr].size();
1713 requests[sr * 2] = pm->send(ArrayView{ 1, &size }, sr,
false);
1714 requests[sr * 2 + 1] = pm->send(answers_uid[sr], sr,
false);
1717 pm->waitAllRequests(requests);
1721 UniqueArray<UniqueArray<Int64>> request_uid(subDomain()->nbSubDomain());
1722 UniqueArray<UniqueArray<Int32>> requested_faces2(subDomain()->nbSubDomain());
1725 debug() <<
"[Face][" << my_proc <<
"] Step 3";
1727 bool need_more_comm =
false;
1729 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1730 if (sr == subDomain()->subDomainId()) {
1734 Int32 total_size = 0;
1735 pm->recv(ArrayView{ 1, &total_size }, sr);
1737 UniqueArray<Int64> answered_uid(total_size);
1738 pm->recv(answered_uid, sr);
1740 if (total_size == 1) {
1744 Int32 answer_to_request_size =
static_cast<Int32
>(answered_uid[0]);
1746 Span<Int64> answer_to_request = answered_uid.subView(1, answer_to_request_size);
1747 Span<Int64> additionnal_answer = answered_uid.subView(answer_to_request_size + 1, answered_uid.size() - (answer_to_request_size + 1));
1753 for (Int32 answer = 0; answer < answer_to_request.size(); ++answer) {
1754 FaceLite& face_lite = new_faces[requested_faces[sr][answer]];
1756 if (answer_to_request[answer] != -1) {
1757 face_lite.m_uid_new_face = answer_to_request[answer];
1765 while (pos < additionnal_answer.size()) {
1766 Int64& uid0 = additionnal_answer[pos++];
1767 Int64 uid1 = additionnal_answer[pos++];
1768 Int64 decal = additionnal_answer[pos++];
1769 if (uid0 == face_lite.m_node0->m_uid_new_node && uid1 == face_lite.m_node1->m_uid_new_node) {
1775 if (pos >= additionnal_answer.size()) {
1776 ARCANE_FATAL(
"Unknown face -- UID0 : {0} -- UID1 : {1}", face_lite.m_node0->m_uid_new_node, face_lite.m_node1->m_uid_new_node);
1782 Span<Int64> sub_additionnal_answer;
1784 while (pos < additionnal_answer.size()) {
1785 Int64 pos_node_in_array = additionnal_answer[pos++];
1787 Int64 decal = additionnal_answer[pos++];
1789 FaceLite& face_lite = new_faces[requested_faces[sr][pos_node_in_array]];
1790 sub_additionnal_answer = additionnal_answer.subSpan(pos, decal);
1798 Node node00 = face_lite.m_node0->m_node0;
1799 Node node01 = face_lite.m_node0->m_node1;
1800 Node node10 = face_lite.m_node1->m_node0;
1801 Node node11 = face_lite.m_node1->m_node1;
1803 Int64 min_uid = INT64_MAX;
1804 Int32 owner_min = -1;
1807 for (Cell cell00 : node00.cells()) {
1808 for (Cell cell01 : node01.cells()) {
1809 if (cell00 == cell01) {
1810 for (Cell cell10 : node10.cells()) {
1811 if (cell01 == cell10) {
1812 for (Cell cell11 : node11.cells()) {
1813 if (cell10 == cell11) {
1814 if (cell11.uniqueId() < min_uid && sub_additionnal_answer.contains(cell11.owner())) {
1815 min_uid = cell11.uniqueId();
1816 owner_min = cell11.owner();
1827 if (owner_min == subDomain()->subDomainId()) {
1828 face_lite.m_owner_new_face = subDomain()->subDomainId();
1829 face_lite.m_uid_new_face = sd_nb_face++;
1832 if (sub_additionnal_answer.size() > 1) {
1833 need_more_comm =
true;
1841 for (
auto proc : sub_additionnal_answer) {
1842 if (proc == my_proc)
1844 request_uid[proc].add(face_lite.m_uid_new_face);
1850 else if (owner_min >= 0) {
1851 need_more_comm =
true;
1852 face_lite.m_owner_new_face = owner_min;
1853 face_lite.m_uid_new_face = -2;
1855 if (request_uid[my_proc].empty()) {
1856 request_uid[my_proc].resize(subDomain()->nbSubDomain(), 0);
1859 request_uid[my_proc][owner_min]++;
1861 requested_faces2[owner_min].add(requested_faces[sr][pos_node_in_array]);
1873 if (need_more_comm) {
1875 UniqueArray<Parallel::Request> requests(subDomain()->nbSubDomain());
1878 debug() <<
"[Face][" << my_proc <<
"] Step 3.2";
1880 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1881 if (sr == subDomain()->subDomainId()) {
1885 if (request_uid[sr].empty())
continue;
1886 requests[sr] = pm->send(request_uid[sr], sr,
false);
1890 pm->waitAllRequests(requests);
1894 debug() <<
"[Face][" << my_proc <<
"] Step 7";
1896 if (!request_uid[my_proc].empty()) {
1897 for (Int32 sr = 0; sr < subDomain()->nbSubDomain(); ++sr) {
1898 if (sr == subDomain()->subDomainId()) {
1902 Int64 size = request_uid[my_proc][sr];
1903 if (size == 0)
continue;
1908 UniqueArray<Int64> requested_uid(size);
1909 pm->recv(requested_uid, sr);
1911 for (Int32 i = 0; i < size; ++i) {
1912 FaceLite& face_lite = new_faces[requested_faces2[sr][i]];
1913 face_lite.m_uid_new_face = requested_uid[i];
1927Int32 MeshCutService::
1928_makeUniqueFaceUID(Int32 sd_nb_face, UniqueArray<FaceLite>& new_faces)
1930 IParallelMng* pm = subDomain()->parallelMng();
1932 UniqueArray<Int32> all_nb_node(pm->commSize());
1933 pm->allGather(ArrayView{ 1, &sd_nb_face }, all_nb_node);
1936 for (
auto& elem : all_nb_node) {
1937 const Int32 old = elem;
1944 for (
auto& elem : new_faces) {
1945 elem.m_uid_new_face += all_nb_node[elem.m_owner_new_face];
1953void MeshCutService::
1957 Int32 g_nb_node = 0;
1958 Int32 g_nb_face = 0;
1960 UniqueArray<Cell> ori_cells;
1962 UniqueArray<Int64> new_cells;
1964 UniqueArray<NodeIntersection> new_nodes;
1965 UniqueArray<FaceLite> new_faces;
1967 for (Int32 i = 0; i < m_plans.size(); ++i) {
1969 debug() <<
"Plan : " << m_plans[i].first <<
", " << m_plans[i].second;
1971 UniqueArray<NodeIntersection> plan_new_nodes;
1972 UniqueArray<FaceLite> plan_new_faces;
1974 Int32 ajust = new_nodes.size();
1976 Int32 previous_g_nb_node = g_nb_node;
1977 Int32 previous_g_nb_face = g_nb_face;
1979 Int32 nb_node_for_this_plan = g_nb_node;
1980 Int32 nb_face_for_this_plan = g_nb_face;
1982 debug() <<
"[" << subDomain()->parallelMng()->commRank() <<
"] _createNodesAndCells";
1983 _createNodesAndCells(i, g_nb_node, plan_new_nodes, ajust, nb_cell, new_cells, g_nb_face, plan_new_faces, ori_cells);
1996 debug() <<
"[" << subDomain()->parallelMng()->commRank() <<
"] _fillNodeUID";
1997 _fillNodeUID(g_nb_node, plan_new_nodes);
1998 nb_node_for_this_plan = g_nb_node - nb_node_for_this_plan;
2000 nb_node_for_this_plan = _makeUniqueNodeUID(nb_node_for_this_plan, plan_new_nodes);
2001 g_nb_node = previous_g_nb_node + nb_node_for_this_plan;
2026 _fillFaceUID(g_nb_face, plan_new_faces);
2027 nb_face_for_this_plan = g_nb_face - nb_face_for_this_plan;
2029 nb_face_for_this_plan = _makeUniqueFaceUID(nb_face_for_this_plan, plan_new_faces);
2030 g_nb_face = previous_g_nb_face + nb_face_for_this_plan;
2045 new_nodes.addRange(plan_new_nodes);
2046 new_faces.addRange(plan_new_faces);
2049 _makeUniqueCellUID(nb_cell, new_cells, new_nodes);
2071 _addFaces(new_faces);
2072 _addCells(new_cells);
2073 m_cloned_mesh->modifier()->endUpdate();
2074 _setCoordNodesAndOwner(new_nodes);
2075 _setFacesOwner(new_faces);
2077 _updateVariables(ori_cells);
2079 m_cloned_mesh->nodeFamily()->notifyItemsOwnerChanged();
2080 m_cloned_mesh->faceFamily()->notifyItemsOwnerChanged();
2082 info() <<
"New mesh : " << m_cloned_mesh->name() <<
" -- NbNode : " << m_cloned_mesh->nbNode() <<
" -- NbCells : " << m_cloned_mesh->nbCell();
2088std::optional<Int64> MeshCutService::
2089_find(Span<FaceLite> new_faces, Int64 node_uid0, Int64 node_uid1)
2091 for (Int32 i = 0; i < new_faces.size(); ++i) {
2092 if (new_faces[i].m_node0->m_uid_new_node == node_uid0 && new_faces[i].m_node1->m_uid_new_node == node_uid1) {
2096 return std::nullopt;
2102void MeshCutService::
2103_addFaces(UniqueArray<FaceLite>& new_faces)
const
2105 UniqueArray<Int64> faces_infos;
2106 faces_infos.reserve(new_faces.size() * 4);
2110 for (
auto& elem : new_faces) {
2111 faces_infos.add(ITI_Line2);
2112 faces_infos.add(elem.m_uid_new_face);
2113 faces_infos.add(elem.m_node0->m_uid_new_node);
2114 faces_infos.add(elem.m_node1->m_uid_new_node);
2118 m_cloned_mesh->modifier()->addFaces(nb_faces, faces_infos);
2124void MeshCutService::
2125_addCells(UniqueArray<Int64>& new_cells)
2130 while (pos0 < new_cells.size()) {
2131 const Int64 type = new_cells[pos0];
2134 new_cells[pos0++] = ITI_Triangle3;
2136 new_cells[pos0++] = ITI_Quad4;
2138 new_cells[pos0++] = ITI_Pentagon5;
2140 new_cells[pos0++] = ITI_Hexagon6;
2144 pos0 += 1 +
static_cast<Int32
>(type);
2149 m_cloned_mesh->modifier()->addCells(nb_cells, new_cells);
2155void MeshCutService::
2156_setCoordNodesAndOwner(UniqueArray<NodeIntersection>& new_nodes)
2159 ENUMERATE_ (Node, inode, m_cloned_mesh->allNodes()) {
2160 const Int64 uid = inode->uniqueId();
2161 for (
const auto& elem : new_nodes) {
2162 if (elem.m_new_node->m_uid_new_node == uid) {
2163 node_coords[inode] = elem.m_intersection_pos;
2164 inode->mutableItemBase().setOwner(elem.m_new_node->m_owner_new_node, subDomain()->subDomainId());
2174void MeshCutService::
2175_setFacesOwner(UniqueArray<FaceLite>& new_faces)
2177 ENUMERATE_ (Face, iface, m_cloned_mesh->allFaces()) {
2178 const Int64 uid = iface->uniqueId();
2179 for (
const auto& elem : new_faces) {
2180 if (elem.m_uid_new_face == uid) {
2181 iface->mutableItemBase().setOwner(elem.m_owner_new_face, subDomain()->subDomainId());
2190void MeshCutService::
2191_updateVariables(UniqueArray<Cell>& ori_cells)
2193 for (Int32 type = 0; type < NB_ARCANE_DATA_TYPE; ++type) {
2196 _updateVariablesT(ori_cells, type,
Byte());
2199 _updateVariablesT(ori_cells, type, Real());
2202 _updateVariablesT(ori_cells, type, Real2());
2205 _updateVariablesT(ori_cells, type, Real2x2());
2208 _updateVariablesT(ori_cells, type, Real3());
2211 _updateVariablesT(ori_cells, type, Real3x3());
2214 _updateVariablesT(ori_cells, type,
Int8());
2217 _updateVariablesT(ori_cells, type, Int16());
2220 _updateVariablesT(ori_cells, type, Int32());
2223 _updateVariablesT(ori_cells, type, Int64());
2226 _updateVariablesT(ori_cells, type,
Float32());
2229 _updateVariablesT(ori_cells, type,
Float16());
2232 _updateVariablesT(ori_cells, type,
BFloat16());
2244void MeshCutService::
2245_updateVariablesT(UniqueArray<Cell>& ori_cells, Int32 type, T)
2247 VariableOriClone<T> voc;
2249 if (m_variables_cloned.count() != m_variables_ori.count()) {
2250 ARCANE_FATAL(
"Bad size -- m_variables_cloned : {0} -- m_variables_ori : {1}", m_variables_cloned.count(), m_variables_ori.count());
2253 VariableCollection::Enumerator iclone(m_variables_cloned);
2254 VariableCollection::Enumerator iori(m_variables_ori);
2256 while (++iclone && ++iori) {
2257 IVariable* ori = *iori;
2258 if (ori->dataType() == type) {
2259 IVariable* clone = *iclone;
2260 if (ori->dimension() == 1) {
2263 if (ori->itemKind() == IK_Unknown) {
2264 voc.ori.unknown.dim1.add(ori_data->view());
2265 voc.clone.unknown.dim1.add(clo_data->view());
2267 else if (ori->itemKind() == IK_Cell) {
2268 voc.ori.cells.dim1.add(ori_data->view());
2269 voc.clone.cells.dim1.add(clo_data->view());
2272 ARCANE_FATAL(
"Variable type not supported -- Type : {0}", ori->itemKind());
2275 else if (ori->dimension() == 2) {
2276 if (ori->itemKind() == IK_Cell) {
2277 VariableResizeArgs vra(-1);
2278 vra.setNewSizeDim2(ori->nbElement() / mesh()->nbCell());
2279 clone->_internalApi()->resize(vra);
2282 voc.ori.cells.dim2.add(ori_data->view());
2283 voc.clone.cells.dim2.add(clo_data->view());
2287 ARCANE_FATAL(
"Variable dim not supported -- Dim : {0}", ori->dimension());
2292 _updateArrayVariable(ori_cells, T(), voc);
2299void MeshCutService::
2300_updateArrayVariable(UniqueArray<Cell>& ori_cells, T, VariableOriClone<T>& voc)
2302 if (voc.ori.isUnknownUsed()) {
2303 for (Int32 i = 0; i < voc.ori.unknown.dim1.size(); ++i) {
2304 voc.clone.unknown.dim1[i].copy(voc.ori.unknown.dim1[i]);
2306 for (Int32 i = 0; i < voc.ori.unknown.dim2.size(); ++i) {
2307 for (Int32 j = 0; j < voc.ori.unknown.dim2[i].dim2Size(); ++j) {
2308 voc.clone.unknown.dim2[i][j].copy(voc.ori.unknown.dim2[i][j]);
2313 ENUMERATE_ (Cell, icell, m_cloned_mesh->ownCells()) {
2314 Cell ori_cell = ori_cells[icell.localId()];
2315 if (voc.ori.isCellsUsed()) {
2316 for (Int32 i = 0; i < voc.ori.cells.dim1.size(); ++i) {
2317 voc.clone.cells.dim1[i][icell.localId()] = voc.ori.cells.dim1[i][ori_cell.localId()];
2319 for (Int32 i = 0; i < voc.ori.cells.dim2.size(); ++i) {
2320 voc.clone.cells.dim2[i][icell.localId()].copy(voc.ori.cells.dim2[i][ori_cell.localId()]);
#define ARCANE_CHECK_POINTER(ptr)
Macro returning the pointer ptr if it is not null or throwing an exception if it is null.
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
CaseOptionsMeshCut * options() const
Options du jeu de données du service.
ArcaneMeshCutObject(const Arcane::ServiceBuildInfo &sbi)
Constructeur.
virtual void clearItems()=0
Deletes all entities of all families in this mesh.
virtual IMeshModifier * modifier()=0
Associated modifier interface.
CellGroup ownCells() const
Returns the group containing all cells specific to this domain.
NodeGroup allNodes() const
Returns the group containing all nodes.
void addPlane(const Real3 &p0, const Real3 &normal) override
Method allowing to add a plane to the cut service. The use of these planes depends on the service.
void setServiceMeshUniqueId(Int32 unique_id) override
Method allowing to set a unique id allowing to create multiple section services for a mesh.
void setVariables(VariableCollection variables) override
Method allowing to add a set of variables to copy on the new mesh.
VariableCollection variables() override
Method allowing to get a set of variables copied on the new mesh.
void updateSection() override
Method allowing to update the mesh section with all planes.
MeshHandle meshSection() override
Méthod allowing to get the mesh section.
Class managing a 3-dimensional real vector.
eServiceType creationType() const
Type of service that can be created by this instance.
Structure containing the information to create a service.
View of an array of elements of type T.
1D data vector with value semantics (STL style).
__host__ __device__ Real dot(Real2 u, Real2 v)
Dot product of u by v in .
Real3 normalizedCrossProduct3(Real3 v1, Real3 v2)
Normalized cross product.
__host__ __device__ Real3 normalizeReal3(Real3 v)
Normalization of a Real3.
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Coordinate type quantity at node.
MeshVariableScalarRefT< Node, Real > VariableNodeReal
Real type quantity at node.
constexpr __host__ __device__ bool isNearlyZeroWithEpsilon(const Type &a, const Type &epsilon)
Tests if a value is approximately equal to zero within an epsilon.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int8_t Int8
Signed integer type of 8 bits.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
bool operator<(const Item &item1, const Item &item2)
Compare two entities.
eServiceType
Service type.
@ ST_CaseOption
The service is used at the dataset level.
double Real
Type representing a real number.
unsigned char Byte
Type of a byte.
auto makeRef(InstanceType *t) -> Ref< InstanceType >
Creates a reference on a pointer.
float Float32
IEEE-753 single-precision floating-point type.
@ DT_Float32
'Float32' data type
@ DT_Real2x2
2x2 tensor data type
@ DT_Int16
16-bit integer data type
@ DT_Int8
8-bit integer data type
@ DT_Real3x3
3x3 tensor data type
@ DT_Int32
32-bit integer data type
@ DT_Real3
Vector 3 data type.
@ DT_Float16
'Float16' data type
@ DT_Int64
64-bit integer data type
@ DT_BFloat16
'BFloat16' data type
@ DT_Real2
Vector 2 data type.
@ Cell
The mesh is AMR by cell.
std::int32_t Int32
Signed integer type of 32 bits.
Arcane::BFloat16 BFloat16
Type 'Brain Float16'.
Arcane::Float16 Float16
Type 'Float16' (binary16).