Arcane  4.2.3.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
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/* Infos sur les mailles d'une direction X Y ou Z d'un maillage structuré. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/cartesianmesh/NodeDirectionMng.h"
15
16#include "arcane/utils/FatalErrorException.h"
17#include "arcane/utils/ArgumentException.h"
18#include "arcane/utils/ITraceMng.h"
19#include "arcane/utils/Real3.h"
20#include "arcane/utils/PlatformUtils.h"
21
22#include "arcane/core/IItemFamily.h"
23#include "arcane/core/ItemGroup.h"
24#include "arcane/core/IMesh.h"
25#include "arcane/core/VariableTypes.h"
26#include "arcane/core/UnstructuredMeshConnectivity.h"
27
28#include "arcane/cartesianmesh/ICartesianMesh.h"
29#include "arcane/cartesianmesh/CellDirectionMng.h"
30#include "arcane/cartesianmesh/internal/ICartesianMeshInternal.h"
31
32/*---------------------------------------------------------------------------*/
33/*---------------------------------------------------------------------------*/
34
35namespace Arcane
36{
37
38/*---------------------------------------------------------------------------*/
39/*---------------------------------------------------------------------------*/
40
42{
43 public:
44
45 Impl() : m_infos(platform::getDefaultDataAllocator()){}
46
47 public:
48
49 NodeGroup m_inner_all_items;
50 NodeGroup m_outer_all_items;
51 NodeGroup m_inpatch_all_items;
52 NodeGroup m_overlap_all_items;
53 NodeGroup m_all_items;
54 ICartesianMesh* m_cartesian_mesh = nullptr;
55 Integer m_patch_index = -1;
57};
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
61
64: m_direction(MD_DirInvalid)
65, m_p(nullptr)
66{
67}
68
69/*---------------------------------------------------------------------------*/
70/*---------------------------------------------------------------------------*/
71
72/*---------------------------------------------------------------------------*/
73/*---------------------------------------------------------------------------*/
74
77{
78 if (m_p)
79 ARCANE_FATAL("Initialisation already done");
80 m_p = new Impl();
81 m_direction = dir;
82 m_nodes = NodeInfoListView(cm->mesh()->nodeFamily());
83 m_p->m_cartesian_mesh = cm;
84 m_p->m_patch_index = patch_index;
85}
86
87/*---------------------------------------------------------------------------*/
88/*---------------------------------------------------------------------------*/
89
92{
93 delete m_p;
94 m_p = nullptr;
95}
96
97/*---------------------------------------------------------------------------*/
98/*---------------------------------------------------------------------------*/
99
102{
103 m_p->m_infos.resize(new_size);
104 m_infos_view = m_p->m_infos.view();
105}
106
107/*---------------------------------------------------------------------------*/
108/*---------------------------------------------------------------------------*/
109
111_internalComputeInfos(const CellDirectionMng& cell_dm,const NodeGroup& all_nodes,
112 const VariableCellReal3& cells_center)
113{
114 Node null_node;
115 m_infos_view.fill(NodeDirectionMng::ItemDirectionInfo());
116
117 Integer mesh_dim = m_p->m_cartesian_mesh->mesh()->dimension();
118 //TODO: ne garder que les noeuds de notre patch
119
120 // Calcul les infos de direction pour les noeuds
121 ENUMERATE_CELL(icell,cell_dm.allCells()){
122 Cell cell = *icell;
123 DirCellNode cn(cell_dm.cellNode(cell));
124
125 NodeLocalId node_next_left = cn.nextLeftId();
126 NodeLocalId node_next_right = cn.nextRightId();
127
128 NodeLocalId node_previous_left = cn.previousLeftId();
129 NodeLocalId node_previous_right = cn.previousRightId();
130
131 m_infos_view[node_previous_left].m_next_lid = node_next_left;
132 m_infos_view[node_next_left].m_previous_lid = node_previous_left;
133
134 m_infos_view[node_previous_right].m_next_lid = node_next_right;
135 m_infos_view[node_next_right].m_previous_lid = node_previous_right;
136
137 if (mesh_dim==3){
138 NodeLocalId top_node_next_left = cn.topNextLeftId();
139 NodeLocalId top_node_next_right = cn.topNextRightId();
140
141 NodeLocalId top_node_previous_left = cn.topPreviousLeftId();
142 NodeLocalId top_node_previous_right = cn.topPreviousRightId();
143
144 m_infos_view[top_node_previous_left].m_next_lid = top_node_next_left;
145 m_infos_view[top_node_next_left].m_previous_lid = top_node_previous_left;
146
147 m_infos_view[top_node_previous_right].m_next_lid = top_node_next_right;
148 m_infos_view[top_node_next_right].m_previous_lid = top_node_previous_right;
149 }
150 }
151
152 Int32UniqueArray inner_lids;
153 Int32UniqueArray outer_lids;
154 IItemFamily* family = all_nodes.itemFamily();
155 ENUMERATE_ITEM (iitem, all_nodes) {
156 Int32 lid = iitem.itemLocalId();
157 Int32 i1 = m_infos_view[lid].m_next_lid;
158 Int32 i2 = m_infos_view[lid].m_previous_lid;
159 if (i1 == NULL_ITEM_LOCAL_ID || i2 == NULL_ITEM_LOCAL_ID)
160 outer_lids.add(lid);
161 else
162 inner_lids.add(lid);
163 }
164 int dir = (int)m_direction;
165 String base_group_name = String("Direction")+dir;
166 if (m_p->m_patch_index>=0)
167 base_group_name = base_group_name + String("AMRPatch")+m_p->m_patch_index;
168 m_p->m_inner_all_items = family->createGroup(String("AllInner")+base_group_name,inner_lids,true);
169 m_p->m_outer_all_items = family->createGroup(String("AllOuter")+base_group_name,outer_lids,true);
170 m_p->m_all_items = all_nodes;
171
172 _filterNodes();
173 _computeNodeCellInfos(cell_dm,cells_center);
174
175 {
176 UnstructuredMeshConnectivityView mesh_connectivity;
177 mesh_connectivity.setMesh(m_p->m_cartesian_mesh->mesh());
178 m_node_cell_view = mesh_connectivity.nodeCell();
179 }
180}
181
182/*---------------------------------------------------------------------------*/
183/*---------------------------------------------------------------------------*/
184
186_internalComputeInfos(const CellDirectionMng& cell_dm, const NodeGroup& all_nodes)
187{
188 m_infos_view.fill(ItemDirectionInfo());
189
190 Integer mesh_dim = m_p->m_cartesian_mesh->mesh()->dimension();
191 //TODO: ne garder que les noeuds de notre patch
192
193 // Calcul les infos de direction pour les noeuds
194 ENUMERATE_CELL (icell, cell_dm.allCells()) {
195 Cell cell = *icell;
196 DirCellNode cn(cell_dm.cellNode(cell));
197
198 NodeLocalId node_next_left = cn.nextLeftId();
199 NodeLocalId node_next_right = cn.nextRightId();
200
201 NodeLocalId node_previous_left = cn.previousLeftId();
202 NodeLocalId node_previous_right = cn.previousRightId();
203
204 m_infos_view[node_previous_left].m_next_lid = node_next_left;
205 m_infos_view[node_next_left].m_previous_lid = node_previous_left;
206
207 m_infos_view[node_previous_right].m_next_lid = node_next_right;
208 m_infos_view[node_next_right].m_previous_lid = node_previous_right;
209
210 if (mesh_dim == 3) {
211 NodeLocalId top_node_next_left = cn.topNextLeftId();
212 NodeLocalId top_node_next_right = cn.topNextRightId();
213
214 NodeLocalId top_node_previous_left = cn.topPreviousLeftId();
215 NodeLocalId top_node_previous_right = cn.topPreviousRightId();
216
217 m_infos_view[top_node_previous_left].m_next_lid = top_node_next_left;
218 m_infos_view[top_node_next_left].m_previous_lid = top_node_previous_left;
219
220 m_infos_view[top_node_previous_right].m_next_lid = top_node_next_right;
221 m_infos_view[top_node_next_right].m_previous_lid = top_node_previous_right;
222 }
223 }
224
225 UniqueArray<Int32> inner_cells_lid;
226 UniqueArray<Int32> outer_cells_lid;
227 cell_dm.innerCells().view().fillLocalIds(inner_cells_lid);
228 cell_dm.outerCells().view().fillLocalIds(outer_cells_lid);
229
230 UniqueArray<Int32> inner_lids;
231 UniqueArray<Int32> outer_lids;
232 // UniqueArray<Int32> inpatch_lids;
233 // UniqueArray<Int32> overlap_lids;
234 IItemFamily* family = all_nodes.itemFamily();
235 ENUMERATE_ (Node, inode, all_nodes) {
236 Int32 lid = inode.itemLocalId();
237 Integer nb_inner_cells = 0;
238 Integer nb_outer_cells = 0;
239 for (Cell cell : inode->cells()) {
240 if (inner_cells_lid.contains(cell.localId())) {
241 nb_inner_cells++;
242 }
243 else if (outer_cells_lid.contains(cell.localId())) {
244 nb_outer_cells++;
245 }
246 }
247 if (nb_inner_cells + nb_outer_cells == inode->nbCell()) {
248 inner_lids.add(lid);
249 }
250 else if (nb_outer_cells != 0) {
251 outer_lids.add(lid);
252 }
253
254 // if (inode->hasFlags(ItemFlags::II_InPatch)) {
255 // inpatch_lids.add(lid);
256 // }
257 // if (inode->hasFlags(ItemFlags::II_Overlap)) {
258 // overlap_lids.add(lid);
259 // }
260 }
261 int dir = (int)m_direction;
262 String base_group_name = String("Direction") + dir;
263 if (m_p->m_patch_index >= 0)
264 base_group_name = base_group_name + String("AMRPatch") + m_p->m_patch_index;
265 m_p->m_inner_all_items = family->createGroup(String("AllInner") + base_group_name, inner_lids, true);
266 m_p->m_outer_all_items = family->createGroup(String("AllOuter") + base_group_name, outer_lids, true);
267 // m_p->m_inpatch_all_items = family->createGroup(String("AllInPatch") + base_group_name, inpatch_lids, true);
268 // m_p->m_overlap_all_items = family->createGroup(String("AllOverlap") + base_group_name, overlap_lids, true);
269 m_p->m_inpatch_all_items = cell_dm.inPatchCells().nodeGroup();
270 m_p->m_overlap_all_items = cell_dm.overlapCells().nodeGroup();
271 m_p->m_all_items = all_nodes;
272
273 _filterNodes();
275
276 {
277 UnstructuredMeshConnectivityView mesh_connectivity;
278 mesh_connectivity.setMesh(m_p->m_cartesian_mesh->mesh());
279 m_node_cell_view = mesh_connectivity.nodeCell();
280 }
281}
282
283/*---------------------------------------------------------------------------*/
284/*---------------------------------------------------------------------------*/
285
292{
293 // Ensemble contenant uniquement les noeuds de notre patch
294 UniqueArray<bool> is_in_patch(allNodes().itemFamily()->maxLocalId(), false);
295 ENUMERATE_NODE (inode, allNodes()) {
296 is_in_patch[inode.itemLocalId()] = true;
297 }
298
299 for( ItemDirectionInfo& idi : m_infos_view ){
300 {
301 Int32 next_lid = idi.m_next_lid;
302 if (next_lid != NULL_ITEM_LOCAL_ID && !is_in_patch[next_lid])
303 idi.m_next_lid = NodeLocalId{};
304 }
305 {
306 Int32 prev_lid = idi.m_previous_lid;
307 if (prev_lid != NULL_ITEM_LOCAL_ID && !is_in_patch[prev_lid])
308 idi.m_previous_lid = NodeLocalId{};
309 }
310 }
311}
312
313/*---------------------------------------------------------------------------*/
314/*---------------------------------------------------------------------------*/
315
320_computeNodeCellInfos(const CellDirectionMng& cell_dm,const VariableCellReal3& cells_center)
321{
322 // TODO: ne traiter que les mailles de notre patch.
323 IndexType indexes_ptr[8];
324 ArrayView<IndexType> indexes(8,indexes_ptr);
325
326 NodeDirectionMng& node_dm = *this;
327 NodeGroup dm_all_nodes = node_dm.allNodes();
328 eMeshDirection dir = m_direction;
329 IMesh* mesh = m_p->m_cartesian_mesh->mesh();
330 Integer mesh_dim = mesh->dimension();
331 VariableNodeReal3& nodes_coord = mesh->nodesCoordinates();
332 if (mesh_dim!=2 && mesh_dim!=3)
333 ARCANE_FATAL("Invalid mesh dimension '{0}'. Valid dimensions are 2 or 3",mesh_dim);
334
335 // Ensemble contenant uniquement les mailles de notre patch
336 // Cela sert à filtrer pour ne garder que ces mailles là dans la connectivité
337 UniqueArray<bool> is_inside_cell(mesh->cellFamily()->maxLocalId(), false);
338 ENUMERATE_CELL (icell, cell_dm.allCells()) {
339 is_inside_cell[icell.itemLocalId()] = true;
340 }
341
342 ENUMERATE_NODE(inode,dm_all_nodes){
343 Node node = *inode;
344 Integer nb_cell = node.nbCell();
345 Real3 node_pos = nodes_coord[node];
346 indexes.fill(DirNode::NULL_CELL);
347 for( Integer i=0; i<nb_cell; ++i ){
348 const IndexType bi = (IndexType)i;
349 Cell cell = node.cell(i);
350 if (!is_inside_cell[cell.localId()])
351 continue;
352
353 Real3 center = cells_center[cell];
354 Real3 wanted_cell_pos;
355 Real3 wanted_node_pos;
356 if (dir==MD_DirX){
357 wanted_cell_pos = center;
358 wanted_node_pos = node_pos;
359 } else if (dir==MD_DirY){
360 wanted_cell_pos = Real3(center.y, -center.x, center.z);
361 wanted_node_pos = Real3(node_pos.y, -node_pos.x, node_pos.z);
362 } else if (dir==MD_DirZ){
363 // TODO: à vérifier pour Y et Z
364 wanted_cell_pos = Real3(center.z, -center.y, center.x);
365 wanted_node_pos = Real3(node_pos.z, -node_pos.y, node_pos.x);
366 }
367 bool is_top = ((wanted_cell_pos.z > wanted_node_pos.z) && mesh_dim==3);
368 if (!is_top){
369 if (wanted_cell_pos.x > wanted_node_pos.x ){
370 if (wanted_cell_pos.y > wanted_node_pos.y )
371 indexes_ptr[CNP_NextLeft] = bi;
372 else
373 indexes_ptr[CNP_NextRight] = bi;
374 }
375 else{
376 if (wanted_cell_pos.y > wanted_node_pos.y )
377 indexes_ptr[CNP_PreviousLeft] = bi;
378 else
379 indexes_ptr[CNP_PreviousRight] = bi;
380 }
381 }
382 else{
383 if (wanted_cell_pos.x > wanted_node_pos.x ){
384 if (wanted_cell_pos.y > wanted_node_pos.y )
385 indexes_ptr[CNP_TopNextLeft] = bi;
386 else
387 indexes_ptr[CNP_TopNextRight] = bi;
388 }
389 else{
390 if (wanted_cell_pos.y > wanted_node_pos.y )
391 indexes_ptr[CNP_TopPreviousLeft] = bi;
392 else
393 indexes_ptr[CNP_TopPreviousRight] = bi;
394 }
395 }
396 }
397 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
398 }
399}
400
401/*---------------------------------------------------------------------------*/
402/*---------------------------------------------------------------------------*/
403
406{
408
409 IndexType indexes_ptr[8];
410 ArrayView indexes(8, indexes_ptr);
411
412 NodeGroup dm_all_nodes = this->allNodes();
413 eMeshDirection dir = m_direction;
414 IMesh* mesh = m_p->m_cartesian_mesh->mesh();
415 Integer mesh_dim = mesh->dimension();
416
417 if (mesh_dim == 2) {
418 constexpr Integer nb_cells_max = 4;
419
420 Int64 uids[nb_cells_max];
421 ArrayView av_uids(nb_cells_max, uids);
422
423 // DirX (Previous->X=0 / Next->X=1 / Right->Y=0 / Left->Y=1)
424 // DirY (Previous->Y=0 / Next->Y=1 / Right->X=1 / Left->X=0)
425
426 // Le CartesianMeshNumberingMng nous donne toujours les mailles autour du noeud dans le même ordre :
427 //
428 // |2|3|
429 // .
430 // |0|1|
431 //
432 // y
433 // ^
434 // |->x
435 //
436 // Lire : le UID de la maille dans le tableau av_uids à la position 0 rempli par
437 // "numbering->cellUniqueIdsAroundNode(av_uids, node)" correspond, dans la direction X,
438 // à la position CNP_PreviousRight.
439 constexpr Int32 dir_x_pos_2d[nb_cells_max] = { CNP_PreviousRight, CNP_NextRight, CNP_PreviousLeft, CNP_NextLeft };
440 constexpr Int32 dir_y_pos_2d[nb_cells_max] = { CNP_PreviousLeft, CNP_PreviousRight, CNP_NextLeft, CNP_NextRight };
441
442 ENUMERATE_ (Node, inode, dm_all_nodes) {
443 Node node = *inode;
444 numbering->cellUniqueIdsAroundNode(node, av_uids);
445 Integer nb_cell = node.nbCell();
446
447 indexes.fill(DirNode::NULL_CELL);
448
449 for (Integer i = 0; i < nb_cell; ++i) {
450 Cell cell = node.cell(i);
451 Integer pos = 0;
452 for (; pos < nb_cells_max; ++pos) {
453 if (cell.uniqueId() == av_uids[pos])
454 break;
455 }
456 if (pos == nb_cells_max)
457 continue;
458
459 const IndexType bi = (IndexType)i;
460 if (dir == MD_DirX) {
461 indexes[dir_x_pos_2d[pos]] = bi;
462 }
463 else if (dir == MD_DirY) {
464 indexes[dir_y_pos_2d[pos]] = bi;
465 }
466 }
467 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
468 }
469 }
470 else if (mesh_dim == 3) {
471 constexpr Integer nb_cells_max = 8;
472
473 Int64 uids[nb_cells_max];
474 ArrayView av_uids(nb_cells_max, uids);
475
476 // DirX (Top->Z=1 / Previous->X=0 / Next->X=1 / Right->Y=0 / Left->Y=1)
477 // DirY (Top->Z=1 / Previous->Y=0 / Next->Y=1 / Right->X=1 / Left->X=0)
478 // DirZ (Top->Y=1 / Previous->Z=0 / Next->Z=1 / Right->X=1 / Left->X=0)
479
480 // Le CartesianMeshNumberingMng nous donne toujours les mailles autour du noeud dans le même ordre :
481 //
482 // z = 0 | z = 1
483 // |2|3| | |6|7|
484 // . | .
485 // |0|1| | |4|5|
486 //
487 // y
488 // ^
489 // |->x
490 //
491 // Lire : le UID de la maille dans le tableau av_uids à la position 2 rempli par
492 // "numbering->cellUniqueIdsAroundNode(av_uids, node)" correspond, dans la direction Z,
493 // à la position CNP_TopPreviousLeft.
494 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 };
495 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 };
496 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 };
497
498 ENUMERATE_ (Node, inode, dm_all_nodes) {
499 Node node = *inode;
500 numbering->cellUniqueIdsAroundNode(node, av_uids);
501 Integer nb_cell = node.nbCell();
502
503 indexes.fill(DirNode::NULL_CELL);
504
505 for (Integer i = 0; i < nb_cell; ++i) {
506 Cell cell = node.cell(i);
507 Integer pos = 0;
508 for (; pos < nb_cells_max; ++pos) {
509 if (cell.uniqueId() == av_uids[pos])
510 break;
511 }
512 if (pos == nb_cells_max)
513 continue;
514
515 const IndexType bi = (IndexType)i;
516
517 if (dir == MD_DirX) {
518 indexes[dir_x_pos_3d[pos]] = bi;
519 }
520 else if (dir == MD_DirY) {
521 indexes[dir_y_pos_3d[pos]] = bi;
522 }
523 else if (dir == MD_DirZ) {
524 indexes[dir_z_pos_3d[pos]] = bi;
525 }
526
527 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
528 }
529 }
530 }
531 else {
532 ARCANE_FATAL("Invalid mesh dimension '{0}'. Valid dimensions are 2 or 3", mesh_dim);
533 }
534}
535
536/*---------------------------------------------------------------------------*/
537/*---------------------------------------------------------------------------*/
538
540allNodes() const
541{
542 return m_p->m_all_items;
543}
544
545/*---------------------------------------------------------------------------*/
546/*---------------------------------------------------------------------------*/
547
549overlapNodes() const
550{
551 return m_p->m_overlap_all_items;
552}
553
554/*---------------------------------------------------------------------------*/
555/*---------------------------------------------------------------------------*/
556
558inPatchNodes() const
559{
560 return m_p->m_inpatch_all_items;
561}
562
563/*---------------------------------------------------------------------------*/
564/*---------------------------------------------------------------------------*/
565
567innerNodes() const
568{
569 return m_p->m_inner_all_items;
570}
571
572/*---------------------------------------------------------------------------*/
573/*---------------------------------------------------------------------------*/
574
576outerNodes() const
577{
578 return m_p->m_outer_all_items;
579}
580
581/*---------------------------------------------------------------------------*/
582/*---------------------------------------------------------------------------*/
583
584} // End namespace Arcane
585
586/*---------------------------------------------------------------------------*/
587/*---------------------------------------------------------------------------*/
#define ARCANE_FATAL(...)
Macro envoyant une exception FatalErrorException.
#define ENUMERATE_(type, name, group)
Enumérateur générique d'un groupe d'entité
#define ENUMERATE_CELL(name, group)
Enumérateur générique d'un groupe de mailles.
#define ENUMERATE_ITEM(name, group)
Enumérateur générique d'un groupe de noeuds.
#define ENUMERATE_NODE(name, group)
Enumérateur générique d'un groupe de noeuds.
Vue modifiable d'un tableau d'un type T.
void fill(const T &o) noexcept
Remplit le tableau avec la valeur o.
void add(ConstReferenceType val)
Ajoute l'élément val à la fin du tableau.
Infos sur les mailles d'une direction spécifique X,Y ou Z d'un maillage structuré.
CellGroup outerCells() const
Groupe de toutes les mailles externes dans la direction.
CellGroup allCells() const
Groupe de toutes les mailles dans la direction.
CellGroup overlapCells() const
Groupe de toutes les mailles de recouvrement dans la direction.
DirCellNode cellNode(Cell c) const
Maille avec infos directionnelles aux noeuds correspondant à la maille c.
CellGroup innerCells() const
Groupe de toutes les mailles internes dans la direction.
CellGroup inPatchCells() const
Groupe de toutes les mailles du patch dans la direction.
Maille d'un maillage.
Definition Item.h:1214
Maille avec info directionnelle des noeuds.
NodeLocalId topNextLeftId() const
Noeud devant à gauche dans la direction.
NodeLocalId nextRightId() const
Noeud devant à droite dans la direction.
NodeLocalId topNextRightId() const
Noeud devant à droite dans la direction.
NodeLocalId nextLeftId() const
Noeud devant à gauche dans la direction.
NodeLocalId topPreviousLeftId() const
Noeud derrière à gauche dans la direction.
NodeLocalId topPreviousRightId() const
Noeud derrière à droite dans la direction.
NodeLocalId previousLeftId() const
Noeud derrière à gauche dans la direction.
NodeLocalId previousRightId() const
Noeud derrière à droite dans la direction.
virtual Ref< ICartesianMeshNumberingMngInternal > cartesianMeshNumberingMngInternal()=0
Méthode permettant de récupérer l'instance de CartesianMeshNumberingMngInternal.
Interface d'un maillage cartésien.
virtual IMesh * mesh() const =0
Maillage associé à ce maillage cartésien.
virtual ICartesianMeshInternal * _internalApi()=0
API interne à Arcane.
Interface d'une famille d'entités.
Definition IItemFamily.h:86
virtual ItemGroup createGroup(const String &name, Int32ConstArrayView local_ids, bool do_override=false)=0
Créé un groupe d'entités de nom name contenant les entités local_ids.
virtual IItemFamily * nodeFamily()=0
Retourne la famille des noeuds.
virtual Integer dimension()=0
Dimension du maillage (1D, 2D ou 3D).
NodeGroup nodeGroup() const
Groupe des noeuds des éléments de ce groupe.
Definition ItemGroup.cc:230
ItemVectorView view() const
Vue sur les entités du groupe.
Definition ItemGroup.cc:583
IItemFamily * itemFamily() const
Famille d'entité à laquelle appartient ce groupe (0 pour le group nul).
Definition ItemGroup.h:123
void fillLocalIds(Array< Int32 > &ids) const
Ajoute à ids la liste des localIds() du vecteur.
constexpr Int32 localId() const
Identifiant local de l'entité dans le sous-domaine du processeur.
Definition Item.h:219
void _internalComputeInfos(const CellDirectionMng &cell_dm, const NodeGroup &all_nodes, const VariableCellReal3 &cells_center)
Calcule les informations sur les noeuds associées aux mailles de la direction cell_dm....
NodeGroup innerNodes() const
Groupe de tous les noeuds internes dans la direction.
void _filterNodes()
Filtre les noeuds devant/derrière pour ne garder que les noeuds de notre patch.
NodeDirectionMng()
Créé une instance vide.
NodeGroup outerNodes() const
Groupe de tous les noeuds externes dans la direction.
void _internalInit(ICartesianMesh *cm, eMeshDirection dir, Integer patch_index)
void _computeNodeCellInfos(const CellDirectionMng &cell_dm, const VariableCellReal3 &cells_center)
Calcul des connectivités noeuds/mailles par direction.
NodeGroup overlapNodes() const
Groupe de tous les noeuds de recouvrement dans la direction.
NodeGroup allNodes() const
Groupe de tous les noeuds dans la direction.
DirNode node(Node n) const
Noeud direction correspondant au noeud n.
NodeGroup inPatchNodes() const
Groupe de tous les noeuds du patch dans la direction.
void _internalResizeInfos(Int32 new_size)
Redimensionne le conteneur contenant les ItemDirectionInfo.
Vue sur les informations des noeuds.
Noeud d'un maillage.
Definition Item.h:582
Classe gérant un vecteur réel de 3 dimensions.
Référence à une instance.
Chaîne de caractères unicode.
Vecteur 1D de données avec sémantique par valeur (style STL).
Vue sur les connectivités standards d'un maillage non structuré.
ItemGroupT< Node > NodeGroup
Groupe de noeuds.
Definition ItemTypes.h:167
MeshVariableScalarRefT< Cell, Real3 > VariableCellReal3
Grandeur au centre des mailles de type coordonnées.
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Grandeur au noeud de type coordonnées.
IMemoryAllocator * getDefaultDataAllocator()
Allocateur par défaut pour les données.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Type entier signé sur 64 bits.
Int32 Integer
Type représentant un entier.
eMeshDirection
Type de la direction pour un maillage structuré
@ MD_DirInvalid
Direction invalide ou non initialisée.
@ MD_DirZ
Direction Z.
@ MD_DirY
Direction Y.
@ MD_DirX
Direction X.
UniqueArray< Int32 > Int32UniqueArray
Tableau dynamique à une dimension d'entiers 32 bits.
Definition UtilsTypes.h:339
@ Cell
Le maillage est AMR par maille.
Definition MeshKind.h:52
std::int32_t Int32
Type entier signé sur 32 bits.
Real y
deuxième composante du triplet
Real z
troisième composante du triplet
Real x
première composante du triplet