82 m_nodes_unique_id.resize(face_nb_node);
83 m_nodes_local_id.resize(face_nb_node);
85 for (
Integer i_node = 0; i_node < face_nb_node; ++i_node) {
86 m_nodes_unique_id[i_node] = face.
node(i_node).
uniqueId();
87 m_nodes_local_id[i_node] = face.
node(i_node).
localId();
90 m_face_nodes_index.resize(face_nb_node);
93 for (
Integer i_node = 0; i_node < face_nb_node; ++i_node) {
94 ItemLocalId node_lid(m_nodes_local_id[m_face_nodes_index[i_node]]);
95 face_topology_modifier->
replaceNode(face, i_node, node_lid);
99 std::pair<Int64, Int64> face_smallest_node_uids = std::make_pair(face.
node(0).
uniqueId(),
102 face_smallest_node_uids = std::make_pair(face.
node(0).
uniqueId(),
106 Integer local_face_number = -1;
108 if (cell.
face(i_face) == face) {
110 local_face_number = i_face;
115 if (local_face_number == (-1))
116 ARCANE_FATAL(
"Incoherent connectivity: Face {0} not connected to cell {1}",
120 bool cell0_is_back_cell =
false;
122 if (face_nb_node == 2) {
123 cell0_is_back_cell = (cell.
node(local_face.
node(0)).
uniqueId() == face_smallest_node_uids.first);
126 for (
Integer i_node = 0; i_node < local_face.
nbNode(); ++i_node) {
127 if (cell.
node(local_face.
node(i_node)).
uniqueId() == face_smallest_node_uids.first) {
129 if (cell.
node(local_face.
node((i_node + 2) % local_face.
nbNode())).
uniqueId() == face_smallest_node_uids.second) {
130 cell0_is_back_cell =
true;
134 cell0_is_back_cell =
false;
139 if (cell.
node(local_face.
node((i_node + 1) % local_face.
nbNode())).
uniqueId() == face_smallest_node_uids.second) {
140 cell0_is_back_cell =
true;
144 cell0_is_back_cell =
false;
154 std::pair<Int32, Int32> face_cells(cell1_lid, cell0_lid);
155 if (cell0_is_back_cell) {
157 std::swap(face_cells.first, face_cells.second);
159 face_topology_modifier->
setBackAndFrontCells(face, CellLocalId(face_cells.first), CellLocalId(face_cells.second));
172 m_nodes_unique_id.resize(face.
nbNode());
173 m_nodes_local_id.resize(face.
nbNode());
176 m_nodes_unique_id[i_node] = face.
node(i_node).
uniqueId();
177 m_nodes_local_id[i_node] = face.
node(i_node).
localId();
180 m_face_nodes_index.resize(face.
nbNode());
184 ItemLocalId node_lid(m_nodes_local_id[m_face_nodes_index[i_node]]);
185 face_topology_modifier->
replaceNode(face, i_node, node_lid);
189 std::pair<Int64, Int64> face_smallest_node_uids = std::make_pair(face.
node(0).
uniqueId(),
193 face_smallest_node_uids = std::make_pair(face.
node(0).
uniqueId(),
218 Integer local_face_number = -1;
220 if (cell.
face(i_face) == face) {
222 local_face_number = i_face;
227 if (local_face_number == (-1)) {
228 ARCANE_FATAL(
"Incoherent connectivity: Face {0} not connected to cell {1}",
234 bool cell_is_back_cell =
false;
237 cell_is_back_cell = (cell.
node(local_face.
node(0)).
uniqueId() == face_smallest_node_uids.first);
240 for (
Integer i_node = 0; i_node < local_face.
nbNode(); ++i_node) {
241 if (cell.
node(local_face.
node(i_node)).
uniqueId() == face_smallest_node_uids.first) {
243 if (cell.
node(local_face.
node((i_node + 2) % local_face.
nbNode())).
uniqueId() == face_smallest_node_uids.second) {
244 cell_is_back_cell =
true;
248 cell_is_back_cell =
false;
253 if (cell.
node(local_face.
node((i_node + 1) % local_face.
nbNode())).
uniqueId() == face_smallest_node_uids.second) {
254 cell_is_back_cell =
true;
258 cell_is_back_cell =
false;
267 std::pair<Int32, Int32> face_cells(NULL_ITEM_LOCAL_ID, NULL_ITEM_LOCAL_ID);
268 bool face_has_two_cell = (face.
nbCell() == 2);
271 Int32 cell1_lid = (face_has_two_cell) ? face.
cell(1).
localId() : NULL_ITEM_LOCAL_ID;
272 if (cell_is_back_cell) {
275 face_cells = { face.
cell(0).
localId(), cell1_lid };
280 face_cells.first = cell1_lid;
285 if (cell_is_back_cell) {
291 face_cells.first = (face_has_two_cell) ? cell.
localId() : NULL_ITEM_LOCAL_ID;
297 face_cells.second = (face_has_two_cell) ? face.
cell(1).
localId() : NULL_ITEM_LOCAL_ID;
300 face_topology_modifier->
setBackAndFrontCells(face, CellLocalId(face_cells.first), CellLocalId(face_cells.second));