Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
NodeDirectionMng.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* NodeDirectionMng.cc (C) 2000-2026 */
9/* */
10/* Information about the cells in an X, Y, or Z direction of a structured */
11/* mesh. */
12/*---------------------------------------------------------------------------*/
13/*---------------------------------------------------------------------------*/
14
15#include "arcane/cartesianmesh/NodeDirectionMng.h"
16
17#include "arcane/utils/FatalErrorException.h"
18#include "arcane/utils/ArgumentException.h"
19#include "arcane/utils/ITraceMng.h"
20#include "arcane/utils/Real3.h"
21#include "arcane/utils/PlatformUtils.h"
22
23#include "arcane/core/IItemFamily.h"
24#include "arcane/core/ItemGroup.h"
25#include "arcane/core/IMesh.h"
26#include "arcane/core/VariableTypes.h"
27#include "arcane/core/UnstructuredMeshConnectivity.h"
28
29#include "arcane/cartesianmesh/ICartesianMesh.h"
30#include "arcane/cartesianmesh/CellDirectionMng.h"
31#include "arcane/cartesianmesh/internal/ICartesianMeshInternal.h"
32
33#include <set>
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38namespace Arcane
39{
40
41/*---------------------------------------------------------------------------*/
42/*---------------------------------------------------------------------------*/
43
45{
46 public:
47
48 Impl()
50 {}
51
52 public:
53
54 NodeGroup m_inner_all_items;
55 NodeGroup m_outer_all_items;
56 NodeGroup m_inpatch_all_items;
57 NodeGroup m_overlap_all_items;
58 NodeGroup m_all_items;
59 ICartesianMesh* m_cartesian_mesh = nullptr;
60 Integer m_patch_index = -1;
62};
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
69: m_direction(MD_DirInvalid)
70, m_p(nullptr)
71{
72}
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80void NodeDirectionMng::
81_internalInit(ICartesianMesh* cm, eMeshDirection dir, Integer patch_index)
82{
83 if (m_p)
84 ARCANE_FATAL("Initialisation already done");
85 m_p = new Impl();
86 m_direction = dir;
87 m_nodes = NodeInfoListView(cm->mesh()->nodeFamily());
88 m_p->m_cartesian_mesh = cm;
89 m_p->m_patch_index = patch_index;
90}
91
92/*---------------------------------------------------------------------------*/
93/*---------------------------------------------------------------------------*/
94
95void NodeDirectionMng::
96_internalDestroy()
97{
98 delete m_p;
99 m_p = nullptr;
100}
101
102/*---------------------------------------------------------------------------*/
103/*---------------------------------------------------------------------------*/
104
107{
108 m_p->m_infos.resize(new_size);
109 m_infos_view = m_p->m_infos.view();
110}
111
112/*---------------------------------------------------------------------------*/
113/*---------------------------------------------------------------------------*/
114
115void NodeDirectionMng::
116_internalComputeInfos(const CellDirectionMng& cell_dm, const NodeGroup& all_nodes,
117 const VariableCellReal3& cells_center)
118{
119 Node null_node;
120 m_infos_view.fill(NodeDirectionMng::ItemDirectionInfo());
121
122 Integer mesh_dim = m_p->m_cartesian_mesh->mesh()->dimension();
123 //TODO: ne garder que les noeuds de notre patch
124
125 // Calcul les infos de direction pour les noeuds
126 ENUMERATE_CELL (icell, cell_dm.allCells()) {
127 Cell cell = *icell;
128 DirCellNode cn(cell_dm.cellNode(cell));
129
130 NodeLocalId node_next_left = cn.nextLeftId();
131 NodeLocalId node_next_right = cn.nextRightId();
132
133 NodeLocalId node_previous_left = cn.previousLeftId();
134 NodeLocalId node_previous_right = cn.previousRightId();
135
136 m_infos_view[node_previous_left].m_next_lid = node_next_left;
137 m_infos_view[node_next_left].m_previous_lid = node_previous_left;
138
139 m_infos_view[node_previous_right].m_next_lid = node_next_right;
140 m_infos_view[node_next_right].m_previous_lid = node_previous_right;
141
142 if (mesh_dim == 3) {
143 NodeLocalId top_node_next_left = cn.topNextLeftId();
144 NodeLocalId top_node_next_right = cn.topNextRightId();
145
146 NodeLocalId top_node_previous_left = cn.topPreviousLeftId();
147 NodeLocalId top_node_previous_right = cn.topPreviousRightId();
148
149 m_infos_view[top_node_previous_left].m_next_lid = top_node_next_left;
150 m_infos_view[top_node_next_left].m_previous_lid = top_node_previous_left;
151
152 m_infos_view[top_node_previous_right].m_next_lid = top_node_next_right;
153 m_infos_view[top_node_next_right].m_previous_lid = top_node_previous_right;
154 }
155 }
156
157 Int32UniqueArray inner_lids;
158 Int32UniqueArray outer_lids;
159 IItemFamily* family = all_nodes.itemFamily();
160 ENUMERATE_ITEM (iitem, all_nodes) {
161 Int32 lid = iitem.itemLocalId();
162 Int32 i1 = m_infos_view[lid].m_next_lid;
163 Int32 i2 = m_infos_view[lid].m_previous_lid;
164 if (i1 == NULL_ITEM_LOCAL_ID || i2 == NULL_ITEM_LOCAL_ID)
165 outer_lids.add(lid);
166 else
167 inner_lids.add(lid);
168 }
169 int dir = (int)m_direction;
170 String base_group_name = String("Direction") + dir;
171 if (m_p->m_patch_index >= 0)
172 base_group_name = base_group_name + String("AMRPatch") + m_p->m_patch_index;
173 m_p->m_inner_all_items = family->createGroup(String("AllInner") + base_group_name, inner_lids, true);
174 m_p->m_outer_all_items = family->createGroup(String("AllOuter") + base_group_name, outer_lids, true);
175 m_p->m_all_items = all_nodes;
176
177 _filterNodes();
178 _computeNodeCellInfos(cell_dm, cells_center);
179
180 {
181 UnstructuredMeshConnectivityView mesh_connectivity;
182 mesh_connectivity.setMesh(m_p->m_cartesian_mesh->mesh());
183 m_node_cell_view = mesh_connectivity.nodeCell();
184 }
185}
186
187/*---------------------------------------------------------------------------*/
188/*---------------------------------------------------------------------------*/
189
190void NodeDirectionMng::
191_internalComputeInfos(const CellDirectionMng& cell_dm, const NodeGroup& all_nodes)
192{
193 m_infos_view.fill(ItemDirectionInfo());
194
195 Integer mesh_dim = m_p->m_cartesian_mesh->mesh()->dimension();
196 //TODO: ne garder que les noeuds de notre patch
197
198 // Calcul les infos de direction pour les noeuds
199 ENUMERATE_CELL (icell, cell_dm.allCells()) {
200 Cell cell = *icell;
201 DirCellNode cn(cell_dm.cellNode(cell));
202
203 NodeLocalId node_next_left = cn.nextLeftId();
204 NodeLocalId node_next_right = cn.nextRightId();
205
206 NodeLocalId node_previous_left = cn.previousLeftId();
207 NodeLocalId node_previous_right = cn.previousRightId();
208
209 m_infos_view[node_previous_left].m_next_lid = node_next_left;
210 m_infos_view[node_next_left].m_previous_lid = node_previous_left;
211
212 m_infos_view[node_previous_right].m_next_lid = node_next_right;
213 m_infos_view[node_next_right].m_previous_lid = node_previous_right;
214
215 if (mesh_dim == 3) {
216 NodeLocalId top_node_next_left = cn.topNextLeftId();
217 NodeLocalId top_node_next_right = cn.topNextRightId();
218
219 NodeLocalId top_node_previous_left = cn.topPreviousLeftId();
220 NodeLocalId top_node_previous_right = cn.topPreviousRightId();
221
222 m_infos_view[top_node_previous_left].m_next_lid = top_node_next_left;
223 m_infos_view[top_node_next_left].m_previous_lid = top_node_previous_left;
224
225 m_infos_view[top_node_previous_right].m_next_lid = top_node_next_right;
226 m_infos_view[top_node_next_right].m_previous_lid = top_node_previous_right;
227 }
228 }
229
230 UniqueArray<Int32> inner_cells_lid;
231 UniqueArray<Int32> outer_cells_lid;
232 cell_dm.innerCells().view().fillLocalIds(inner_cells_lid);
233 cell_dm.outerCells().view().fillLocalIds(outer_cells_lid);
234
235 UniqueArray<Int32> inner_lids;
236 UniqueArray<Int32> outer_lids;
237 // UniqueArray<Int32> inpatch_lids;
238 // UniqueArray<Int32> overlap_lids;
239 IItemFamily* family = all_nodes.itemFamily();
240 ENUMERATE_ (Node, inode, all_nodes) {
241 Int32 lid = inode.itemLocalId();
242 Integer nb_inner_cells = 0;
243 Integer nb_outer_cells = 0;
244 for (Cell cell : inode->cells()) {
245 if (inner_cells_lid.contains(cell.localId())) {
246 nb_inner_cells++;
247 }
248 else if (outer_cells_lid.contains(cell.localId())) {
249 nb_outer_cells++;
250 }
251 }
252 if (nb_inner_cells + nb_outer_cells == inode->nbCell()) {
253 inner_lids.add(lid);
254 }
255 else if (nb_outer_cells != 0) {
256 outer_lids.add(lid);
257 }
258
259 // if (inode->hasFlags(ItemFlags::II_InPatch)) {
260 // inpatch_lids.add(lid);
261 // }
262 // if (inode->hasFlags(ItemFlags::II_Overlap)) {
263 // overlap_lids.add(lid);
264 // }
265 }
266 int dir = (int)m_direction;
267 String base_group_name = String("Direction") + dir;
268 if (m_p->m_patch_index >= 0)
269 base_group_name = base_group_name + String("AMRPatch") + m_p->m_patch_index;
270 m_p->m_inner_all_items = family->createGroup(String("AllInner") + base_group_name, inner_lids, true);
271 m_p->m_outer_all_items = family->createGroup(String("AllOuter") + base_group_name, outer_lids, true);
272 // m_p->m_inpatch_all_items = family->createGroup(String("AllInPatch") + base_group_name, inpatch_lids, true);
273 // m_p->m_overlap_all_items = family->createGroup(String("AllOverlap") + base_group_name, overlap_lids, true);
274 m_p->m_inpatch_all_items = cell_dm.inPatchCells().nodeGroup();
275 m_p->m_overlap_all_items = cell_dm.overlapCells().nodeGroup();
276 m_p->m_all_items = all_nodes;
277
278 _filterNodes();
279 _computeNodeCellInfos();
280
281 {
282 UnstructuredMeshConnectivityView mesh_connectivity;
283 mesh_connectivity.setMesh(m_p->m_cartesian_mesh->mesh());
284 m_node_cell_view = mesh_connectivity.nodeCell();
285 }
286}
287
288/*---------------------------------------------------------------------------*/
289/*---------------------------------------------------------------------------*/
290
291/*!
292 * \brief Filters the front/back nodes to keep only the nodes of our patch.
293 */
294void NodeDirectionMng::
295_filterNodes()
296{
297 // Set containing only the nodes of our patch
298 std::set<NodeLocalId> nodes_set;
299 ENUMERATE_NODE (inode, allNodes()) {
300 nodes_set.insert(NodeLocalId(inode.itemLocalId()));
301 }
302
303 for (ItemDirectionInfo& idi : m_infos_view) {
304 {
305 Int32 next_lid = idi.m_next_lid;
306 if (next_lid != NULL_ITEM_LOCAL_ID)
307 if (nodes_set.find(NodeLocalId(next_lid)) == nodes_set.end())
308 idi.m_next_lid = NodeLocalId{};
309 }
310 {
311 Int32 prev_lid = idi.m_previous_lid;
312 if (prev_lid != NULL_ITEM_LOCAL_ID)
313 if (nodes_set.find(NodeLocalId(prev_lid)) == nodes_set.end())
314 idi.m_previous_lid = NodeLocalId{};
315 }
316 }
317}
318
319/*---------------------------------------------------------------------------*/
320/*---------------------------------------------------------------------------*/
321
322/*!
323 * \brief Brief calculation of node/cell connectivities by direction.
324 */
325void NodeDirectionMng::
326_computeNodeCellInfos(const CellDirectionMng& cell_dm, const VariableCellReal3& cells_center)
327{
328 // TODO: only process the cells of our patch.
329 IndexType indexes_ptr[8];
330 ArrayView<IndexType> indexes(8, indexes_ptr);
331
332 NodeDirectionMng& node_dm = *this;
333 NodeGroup dm_all_nodes = node_dm.allNodes();
334 eMeshDirection dir = m_direction;
335 IMesh* mesh = m_p->m_cartesian_mesh->mesh();
336 Integer mesh_dim = mesh->dimension();
337 VariableNodeReal3& nodes_coord = mesh->nodesCoordinates();
338 if (mesh_dim != 2 && mesh_dim != 3)
339 ARCANE_FATAL("Invalid mesh dimension '{0}'. Valid dimensions are 2 or 3", mesh_dim);
340
341 // Set containing only the cells of our patch
342 // This is used to filter to keep only these cells in the connectivity
343 std::set<CellLocalId> inside_cells;
344 ENUMERATE_CELL (icell, cell_dm.allCells()) {
345 inside_cells.insert(CellLocalId(icell.itemLocalId()));
346 }
347
348 ENUMERATE_NODE (inode, dm_all_nodes) {
349 Node node = *inode;
350 Integer nb_cell = node.nbCell();
351 Real3 node_pos = nodes_coord[node];
352 indexes.fill(DirNode::NULL_CELL);
353 for (Integer i = 0; i < nb_cell; ++i) {
354 const IndexType bi = (IndexType)i;
355 Cell cell = node.cell(i);
356 if (inside_cells.find(CellLocalId(cell.localId())) == inside_cells.end())
357 continue;
358
359 Real3 center = cells_center[cell];
360 Real3 wanted_cell_pos;
361 Real3 wanted_node_pos;
362 if (dir == MD_DirX) {
363 wanted_cell_pos = center;
364 wanted_node_pos = node_pos;
365 }
366 else if (dir == MD_DirY) {
367 wanted_cell_pos = Real3(center.y, -center.x, center.z);
368 wanted_node_pos = Real3(node_pos.y, -node_pos.x, node_pos.z);
369 }
370 else if (dir == MD_DirZ) {
371 // TODO: to check for Y and Z
372 wanted_cell_pos = Real3(center.z, -center.y, center.x);
373 wanted_node_pos = Real3(node_pos.z, -node_pos.y, node_pos.x);
374 }
375 bool is_top = ((wanted_cell_pos.z > wanted_node_pos.z) && mesh_dim == 3);
376 if (!is_top) {
377 if (wanted_cell_pos.x > wanted_node_pos.x) {
378 if (wanted_cell_pos.y > wanted_node_pos.y)
379 indexes_ptr[CNP_NextLeft] = bi;
380 else
381 indexes_ptr[CNP_NextRight] = bi;
382 }
383 else {
384 if (wanted_cell_pos.y > wanted_node_pos.y)
385 indexes_ptr[CNP_PreviousLeft] = bi;
386 else
387 indexes_ptr[CNP_PreviousRight] = bi;
388 }
389 }
390 else {
391 if (wanted_cell_pos.x > wanted_node_pos.x) {
392 if (wanted_cell_pos.y > wanted_node_pos.y)
393 indexes_ptr[CNP_TopNextLeft] = bi;
394 else
395 indexes_ptr[CNP_TopNextRight] = bi;
396 }
397 else {
398 if (wanted_cell_pos.y > wanted_node_pos.y)
399 indexes_ptr[CNP_TopPreviousLeft] = bi;
400 else
401 indexes_ptr[CNP_TopPreviousRight] = bi;
402 }
403 }
404 }
405 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
406 }
407}
408
409/*---------------------------------------------------------------------------*/
410/*---------------------------------------------------------------------------*/
411
412void NodeDirectionMng::
413_computeNodeCellInfos() const
414{
415 Ref<ICartesianMeshNumberingMngInternal> numbering = m_p->m_cartesian_mesh->_internalApi()->cartesianMeshNumberingMngInternal();
416
417 IndexType indexes_ptr[8];
418 ArrayView indexes(8, indexes_ptr);
419
420 NodeGroup dm_all_nodes = this->allNodes();
421 eMeshDirection dir = m_direction;
422 IMesh* mesh = m_p->m_cartesian_mesh->mesh();
423 Integer mesh_dim = mesh->dimension();
424
425 if (mesh_dim == 2) {
426 constexpr Integer nb_cells_max = 4;
427
428 Int64 uids[nb_cells_max];
429 ArrayView av_uids(nb_cells_max, uids);
430
431 // DirX (Previous->X=0 / Next->X=1 / Right->Y=0 / Left->Y=1)
432 // DirY (Previous->Y=0 / Next->Y=1 / Right->X=1 / Left->X=0)
433
434 // The CartesianMeshNumberingMng always gives us the cells around the node in the same order:
435 //
436 // |2|3|
437 // .
438 // |0|1|
439 //
440 // y
441 // ^
442 // |->x
443 //
444 // Read: the cell UID in the av_uids array at position 0 filled by
445 // "numbering->cellUniqueIdsAroundNode(av_uids, node)" corresponds, in the X direction,
446 // to the CNP_PreviousRight position.
447 constexpr Int32 dir_x_pos_2d[nb_cells_max] = { CNP_PreviousRight, CNP_NextRight, CNP_PreviousLeft, CNP_NextLeft };
448 constexpr Int32 dir_y_pos_2d[nb_cells_max] = { CNP_PreviousLeft, CNP_PreviousRight, CNP_NextLeft, CNP_NextRight };
449
450 ENUMERATE_ (Node, inode, dm_all_nodes) {
451 Node node = *inode;
452 numbering->cellUniqueIdsAroundNode(node, av_uids);
453 Integer nb_cell = node.nbCell();
454
455 indexes.fill(DirNode::NULL_CELL);
456
457 for (Integer i = 0; i < nb_cell; ++i) {
458 Cell cell = node.cell(i);
459 Integer pos = 0;
460 for (; pos < nb_cells_max; ++pos) {
461 if (cell.uniqueId() == av_uids[pos])
462 break;
463 }
464 if (pos == nb_cells_max)
465 continue;
466
467 const IndexType bi = (IndexType)i;
468 if (dir == MD_DirX) {
469 indexes[dir_x_pos_2d[pos]] = bi;
470 }
471 else if (dir == MD_DirY) {
472 indexes[dir_y_pos_2d[pos]] = bi;
473 }
474 }
475 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
476 }
477 }
478 else if (mesh_dim == 3) {
479 constexpr Integer nb_cells_max = 8;
480
481 Int64 uids[nb_cells_max];
482 ArrayView av_uids(nb_cells_max, uids);
483
484 // DirX (Top->Z=1 / Previous->X=0 / Next->X=1 / Right->Y=0 / Left->Y=1)
485 // DirY (Top->Z=1 / Previous->Y=0 / Next->Y=1 / Right->X=1 / Left->X=0)
486 // DirZ (Top->Y=1 / Previous->Z=0 / Next->Z=1 / Right->X=1 / Left->X=0)
487
488 // The CartesianMeshNumberingMng always gives us the cells around the node in the same order:
489 //
490 // z = 0 | z = 1
491 // |2|3| | |6|7|
492 // . | .
493 // |0|1| | |4|5|
494 //
495 // y
496 // ^
497 // |->x
498 //
499 // Read: the cell UID in the av_uids array at position 2 filled by
500 // "numbering->cellUniqueIdsAroundNode(av_uids, node)" corresponds, in the Z direction,
501 // to the CNP_TopPreviousLeft position.
502 constexpr Int32 dir_x_pos_3d[nb_cells_max] = { CNP_PreviousRight, CNP_NextRight, CNP_PreviousLeft, CNP_NextLeft, CNP_TopPreviousRight, CNP_TopNextRight, CNP_TopPreviousLeft, CNP_TopNextLeft };
503 constexpr Int32 dir_y_pos_3d[nb_cells_max] = { CNP_PreviousLeft, CNP_PreviousRight, CNP_NextLeft, CNP_NextRight, CNP_TopPreviousLeft, CNP_TopPreviousRight, CNP_TopNextLeft, CNP_TopNextRight };
504 constexpr Int32 dir_z_pos_3d[nb_cells_max] = { CNP_PreviousLeft, CNP_PreviousRight, CNP_TopPreviousLeft, CNP_TopPreviousRight, CNP_NextLeft, CNP_NextRight, CNP_TopNextLeft, CNP_TopNextRight };
505
506 ENUMERATE_ (Node, inode, dm_all_nodes) {
507 Node node = *inode;
508 numbering->cellUniqueIdsAroundNode(node, av_uids);
509 Integer nb_cell = node.nbCell();
510
511 indexes.fill(DirNode::NULL_CELL);
512
513 for (Integer i = 0; i < nb_cell; ++i) {
514 Cell cell = node.cell(i);
515 Integer pos = 0;
516 for (; pos < nb_cells_max; ++pos) {
517 if (cell.uniqueId() == av_uids[pos])
518 break;
519 }
520 if (pos == nb_cells_max)
521 continue;
522
523 const IndexType bi = (IndexType)i;
524
525 if (dir == MD_DirX) {
526 indexes[dir_x_pos_3d[pos]] = bi;
527 }
528 else if (dir == MD_DirY) {
529 indexes[dir_y_pos_3d[pos]] = bi;
530 }
531 else if (dir == MD_DirZ) {
532 indexes[dir_z_pos_3d[pos]] = bi;
533 }
534
535 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
536 }
537 }
538 }
539 else {
540 ARCANE_FATAL("Invalid mesh dimension '{0}'. Valid dimensions are 2 or 3", mesh_dim);
541 }
542}
543
544/*---------------------------------------------------------------------------*/
545/*---------------------------------------------------------------------------*/
546
548allNodes() const
549{
550 return m_p->m_all_items;
551}
552
553/*---------------------------------------------------------------------------*/
554/*---------------------------------------------------------------------------*/
555
557overlapNodes() const
558{
559 return m_p->m_overlap_all_items;
560}
561
562/*---------------------------------------------------------------------------*/
563/*---------------------------------------------------------------------------*/
564
566inPatchNodes() const
567{
568 return m_p->m_inpatch_all_items;
569}
570
571/*---------------------------------------------------------------------------*/
572/*---------------------------------------------------------------------------*/
573
575innerNodes() const
576{
577 return m_p->m_inner_all_items;
578}
579
580/*---------------------------------------------------------------------------*/
581/*---------------------------------------------------------------------------*/
582
584outerNodes() const
585{
586 return m_p->m_outer_all_items;
587}
588
589/*---------------------------------------------------------------------------*/
590/*---------------------------------------------------------------------------*/
591
592} // End namespace Arcane
593
594/*---------------------------------------------------------------------------*/
595/*---------------------------------------------------------------------------*/
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
#define ENUMERATE_(type, name, group)
Generic enumerator for an entity group.
#define ENUMERATE_CELL(name, group)
Generic enumerator for a cell group.
#define ENUMERATE_ITEM(name, group)
Generic enumerator for a node group.
#define ENUMERATE_NODE(name, group)
Generic enumerator for a node group.
Info about the cells in a specific X, Y, or Z direction of a structured mesh.
CellGroup allCells() const
Group of all cells in the direction.
DirCellNode cellNode(Cell c) const
cell with directional info at nodes corresponding to cell c.
Cell of a mesh.
Definition Item.h:1300
Cell with directional node information.
virtual IMesh * mesh() const =0
Mesh associated with this Cartesian mesh.
virtual ItemGroup createGroup(const String &name, Int32ConstArrayView local_ids, bool do_override=false)=0
Creates an entity group named name containing the entities local_ids.
virtual IItemFamily * nodeFamily()=0
Returns the node family.
virtual Integer dimension()=0
Mesh dimension (1D, 2D, or 3D).
IItemFamily * itemFamily() const
Entity family to which this group belongs (0 for the null group).
Definition ItemGroup.h:128
IMesh * mesh() const
Mesh to which this group belongs (0 for the null group).
Definition ItemGroup.h:131
NodeGroup innerNodes() const
Group of all inner nodes in the direction.
NodeDirectionMng()
Creates an empty instance.
NodeGroup outerNodes() const
Group of all outer nodes in the direction.
NodeGroup overlapNodes() const
Group of all overlap nodes in the direction.
NodeGroup allNodes() const
Group of all nodes in the direction.
DirNode node(Node n) const
Direction node corresponding to node n.
NodeGroup inPatchNodes() const
Group of all patch nodes in the direction.
void _internalResizeInfos(Int32 new_size)
Resizes the container holding the ItemDirectionInfo.
View of node information.
Node of a mesh.
Definition Item.h:598
1D data vector with value semantics (STL style).
void resize(Int64 s)
Changes the number of elements in the array to s.
__host__ __device__ void fill(T o)
Fills the array with the value o.
Definition Span.h:383
ItemGroupT< Node > NodeGroup
Group of nodes.
Definition ItemTypes.h:168
MeshVariableScalarRefT< Cell, Real3 > VariableCellReal3
Coordinate type quantity at cell center.
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Coordinate type quantity at node.
IMemoryAllocator * getDefaultDataAllocator()
Default allocator for data.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
eMeshDirection
Direction type for a structured mesh.
@ MD_DirInvalid
Invalid or uninitialized direction.
@ MD_DirZ
Z Direction.
@ MD_DirY
Y Direction.
@ MD_DirX
X Direction.
UniqueArray< Int32 > Int32UniqueArray
Dynamic 1D array of 32-bit integers.
Definition UtilsTypes.h:341
@ Cell
The mesh is AMR by cell.
Definition MeshKind.h:53
std::int32_t Int32
Signed integer type of 32 bits.