Arcane  v4.1.1.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
NodeDirectionMng.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2025 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-2025 */
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#include <set>
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37namespace Arcane
38{
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
44{
45 public:
46
47 Impl() : m_infos(platform::getDefaultDataAllocator()){}
48
49 public:
50
51 NodeGroup m_inner_all_items;
52 NodeGroup m_outer_all_items;
53 NodeGroup m_inpatch_all_items;
54 NodeGroup m_overall_all_items;
55 NodeGroup m_all_items;
56 ICartesianMesh* m_cartesian_mesh = nullptr;
57 Integer m_patch_index = -1;
59};
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
66: m_direction(MD_DirInvalid)
67, m_p(nullptr)
68{
69}
70
71/*---------------------------------------------------------------------------*/
72/*---------------------------------------------------------------------------*/
73
74/*---------------------------------------------------------------------------*/
75/*---------------------------------------------------------------------------*/
76
77void NodeDirectionMng::
78_internalInit(ICartesianMesh* cm,eMeshDirection dir,Integer patch_index)
79{
80 if (m_p)
81 ARCANE_FATAL("Initialisation already done");
82 m_p = new Impl();
83 m_direction = dir;
84 m_nodes = NodeInfoListView(cm->mesh()->nodeFamily());
85 m_p->m_cartesian_mesh = cm;
86 m_p->m_patch_index = patch_index;
87}
88
89/*---------------------------------------------------------------------------*/
90/*---------------------------------------------------------------------------*/
91
92void NodeDirectionMng::
93_internalDestroy()
94{
95 delete m_p;
96 m_p = nullptr;
97}
98
99/*---------------------------------------------------------------------------*/
100/*---------------------------------------------------------------------------*/
101
104{
105 m_p->m_infos.resize(new_size);
106 m_infos_view = m_p->m_infos.view();
107}
108
109/*---------------------------------------------------------------------------*/
110/*---------------------------------------------------------------------------*/
111
112void NodeDirectionMng::
113_internalComputeInfos(const CellDirectionMng& cell_dm,const NodeGroup& all_nodes,
114 const VariableCellReal3& cells_center)
115{
116 Node null_node;
117 m_infos_view.fill(NodeDirectionMng::ItemDirectionInfo());
118
119 Integer mesh_dim = m_p->m_cartesian_mesh->mesh()->dimension();
120 //TODO: ne garder que les noeuds de notre patch
121
122 // Calcul les infos de direction pour les noeuds
123 ENUMERATE_CELL(icell,cell_dm.allCells()){
124 Cell cell = *icell;
125 DirCellNode cn(cell_dm.cellNode(cell));
126
127 NodeLocalId node_next_left = cn.nextLeftId();
128 NodeLocalId node_next_right = cn.nextRightId();
129
130 NodeLocalId node_previous_left = cn.previousLeftId();
131 NodeLocalId node_previous_right = cn.previousRightId();
132
133 m_infos_view[node_previous_left].m_next_lid = node_next_left;
134 m_infos_view[node_next_left].m_previous_lid = node_previous_left;
135
136 m_infos_view[node_previous_right].m_next_lid = node_next_right;
137 m_infos_view[node_next_right].m_previous_lid = node_previous_right;
138
139 if (mesh_dim==3){
140 NodeLocalId top_node_next_left = cn.topNextLeftId();
141 NodeLocalId top_node_next_right = cn.topNextRightId();
142
143 NodeLocalId top_node_previous_left = cn.topPreviousLeftId();
144 NodeLocalId top_node_previous_right = cn.topPreviousRightId();
145
146 m_infos_view[top_node_previous_left].m_next_lid = top_node_next_left;
147 m_infos_view[top_node_next_left].m_previous_lid = top_node_previous_left;
148
149 m_infos_view[top_node_previous_right].m_next_lid = top_node_next_right;
150 m_infos_view[top_node_next_right].m_previous_lid = top_node_previous_right;
151 }
152 }
153
154 Int32UniqueArray inner_lids;
155 Int32UniqueArray outer_lids;
156 IItemFamily* family = all_nodes.itemFamily();
157 ENUMERATE_ITEM (iitem, all_nodes) {
158 Int32 lid = iitem.itemLocalId();
159 Int32 i1 = m_infos_view[lid].m_next_lid;
160 Int32 i2 = m_infos_view[lid].m_previous_lid;
161 if (i1 == NULL_ITEM_LOCAL_ID || i2 == NULL_ITEM_LOCAL_ID)
162 outer_lids.add(lid);
163 else
164 inner_lids.add(lid);
165 }
166 int dir = (int)m_direction;
167 String base_group_name = String("Direction")+dir;
168 if (m_p->m_patch_index>=0)
169 base_group_name = base_group_name + String("AMRPatch")+m_p->m_patch_index;
170 m_p->m_inner_all_items = family->createGroup(String("AllInner")+base_group_name,inner_lids,true);
171 m_p->m_outer_all_items = family->createGroup(String("AllOuter")+base_group_name,outer_lids,true);
172 m_p->m_all_items = all_nodes;
173
174 _filterNodes();
175 _computeNodeCellInfos(cell_dm,cells_center);
176
177 {
178 UnstructuredMeshConnectivityView mesh_connectivity;
179 mesh_connectivity.setMesh(m_p->m_cartesian_mesh->mesh());
180 m_node_cell_view = mesh_connectivity.nodeCell();
181 }
182}
183
184/*---------------------------------------------------------------------------*/
185/*---------------------------------------------------------------------------*/
186
187void NodeDirectionMng::
188_internalComputeInfos(const CellDirectionMng& cell_dm, const NodeGroup& all_nodes)
189{
190 m_infos_view.fill(ItemDirectionInfo());
191
192 Integer mesh_dim = m_p->m_cartesian_mesh->mesh()->dimension();
193 //TODO: ne garder que les noeuds de notre patch
194
195 // Calcul les infos de direction pour les noeuds
196 ENUMERATE_CELL (icell, cell_dm.allCells()) {
197 Cell cell = *icell;
198 DirCellNode cn(cell_dm.cellNode(cell));
199
200 NodeLocalId node_next_left = cn.nextLeftId();
201 NodeLocalId node_next_right = cn.nextRightId();
202
203 NodeLocalId node_previous_left = cn.previousLeftId();
204 NodeLocalId node_previous_right = cn.previousRightId();
205
206 m_infos_view[node_previous_left].m_next_lid = node_next_left;
207 m_infos_view[node_next_left].m_previous_lid = node_previous_left;
208
209 m_infos_view[node_previous_right].m_next_lid = node_next_right;
210 m_infos_view[node_next_right].m_previous_lid = node_previous_right;
211
212 if (mesh_dim == 3) {
213 NodeLocalId top_node_next_left = cn.topNextLeftId();
214 NodeLocalId top_node_next_right = cn.topNextRightId();
215
216 NodeLocalId top_node_previous_left = cn.topPreviousLeftId();
217 NodeLocalId top_node_previous_right = cn.topPreviousRightId();
218
219 m_infos_view[top_node_previous_left].m_next_lid = top_node_next_left;
220 m_infos_view[top_node_next_left].m_previous_lid = top_node_previous_left;
221
222 m_infos_view[top_node_previous_right].m_next_lid = top_node_next_right;
223 m_infos_view[top_node_next_right].m_previous_lid = top_node_previous_right;
224 }
225 }
226
227 UniqueArray<Int32> inner_cells_lid;
228 UniqueArray<Int32> outer_cells_lid;
229 cell_dm.innerCells().view().fillLocalIds(inner_cells_lid);
230 cell_dm.outerCells().view().fillLocalIds(outer_cells_lid);
231
232 UniqueArray<Int32> inner_lids;
233 UniqueArray<Int32> outer_lids;
234 UniqueArray<Int32> inpatch_lids;
235 UniqueArray<Int32> overall_lids;
236 IItemFamily* family = all_nodes.itemFamily();
237 ENUMERATE_ (Node, inode, all_nodes) {
238 Int32 lid = inode.itemLocalId();
239 Integer nb_inner_cells = 0;
240 Integer nb_outer_cells = 0;
241 for (Cell cell : inode->cells()) {
242 if (inner_cells_lid.contains(cell.localId())) {
243 nb_inner_cells++;
244 }
245 else if (outer_cells_lid.contains(cell.localId())) {
246 nb_outer_cells++;
247 }
248 }
249 if (nb_inner_cells + nb_outer_cells == inode->nbCell()) {
250 inner_lids.add(lid);
251 inpatch_lids.add(lid);
252 }
253 else if (nb_outer_cells != 0) {
254 outer_lids.add(lid);
255 inpatch_lids.add(lid);
256 }
257 else {
258 overall_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_overall_all_items = family->createGroup(String("AllOverall") + base_group_name, overall_lids, true);
269 m_p->m_all_items = all_nodes;
270
271 _filterNodes();
272 _computeNodeCellInfos();
273
274 {
275 UnstructuredMeshConnectivityView mesh_connectivity;
276 mesh_connectivity.setMesh(m_p->m_cartesian_mesh->mesh());
277 m_node_cell_view = mesh_connectivity.nodeCell();
278 }
279}
280
281/*---------------------------------------------------------------------------*/
282/*---------------------------------------------------------------------------*/
283
284/*!
285 * \brief Filtre les noeuds devant/derrière pour ne garder que les
286 * noeuds de notre patch.
287 */
288void NodeDirectionMng::
289_filterNodes()
290{
291 // Ensemble contenant uniquement les noeuds de notre patch
292 std::set<NodeLocalId> nodes_set;
293 ENUMERATE_NODE(inode,allNodes()){
294 nodes_set.insert(NodeLocalId(inode.itemLocalId()));
295 }
296
297 for( ItemDirectionInfo& idi : m_infos_view ){
298 {
299 Int32 next_lid = idi.m_next_lid;
300 if (next_lid!=NULL_ITEM_LOCAL_ID)
301 if (nodes_set.find(NodeLocalId(next_lid))==nodes_set.end())
302 idi.m_next_lid = NodeLocalId{};
303 }
304 {
305 Int32 prev_lid = idi.m_previous_lid;
306 if (prev_lid!=NULL_ITEM_LOCAL_ID)
307 if (nodes_set.find(NodeLocalId(prev_lid))==nodes_set.end())
308 idi.m_previous_lid = NodeLocalId{};
309 }
310 }
311}
312
313/*---------------------------------------------------------------------------*/
314/*---------------------------------------------------------------------------*/
315/*!
316 * \brief Calcul des connectivités noeuds/mailles par direction.
317 */
318void NodeDirectionMng::
319_computeNodeCellInfos(const CellDirectionMng& cell_dm,const VariableCellReal3& cells_center)
320{
321 // TODO: ne traiter que les mailles de notre patch.
322 IndexType indexes_ptr[8];
323 ArrayView<IndexType> indexes(8,indexes_ptr);
324
325 NodeDirectionMng& node_dm = *this;
326 NodeGroup dm_all_nodes = node_dm.allNodes();
327 eMeshDirection dir = m_direction;
328 IMesh* mesh = m_p->m_cartesian_mesh->mesh();
329 Integer mesh_dim = mesh->dimension();
330 VariableNodeReal3& nodes_coord = mesh->nodesCoordinates();
331 if (mesh_dim!=2 && mesh_dim!=3)
332 ARCANE_FATAL("Invalid mesh dimension '{0}'. Valid dimensions are 2 or 3",mesh_dim);
333
334 // Ensemble contenant uniquement les mailles de notre patch
335 // Cela sert à filtrer pour ne garder que ces mailles là dans la connectivité
336 std::set<CellLocalId> inside_cells;
337 ENUMERATE_CELL(icell,cell_dm.allCells()){
338 inside_cells.insert(CellLocalId(icell.itemLocalId()));
339 }
340
341 ENUMERATE_NODE(inode,dm_all_nodes){
342 Node node = *inode;
343 Integer nb_cell = node.nbCell();
344 Real3 node_pos = nodes_coord[node];
345 indexes.fill(DirNode::NULL_CELL);
346 for( Integer i=0; i<nb_cell; ++i ){
347 const IndexType bi = (IndexType)i;
348 Cell cell = node.cell(i);
349 if (inside_cells.find(CellLocalId(cell.localId()))==inside_cells.end())
350 continue;
351
352 Real3 center = cells_center[cell];
353 Real3 wanted_cell_pos;
354 Real3 wanted_node_pos;
355 if (dir==MD_DirX){
356 wanted_cell_pos = center;
357 wanted_node_pos = node_pos;
358 } else if (dir==MD_DirY){
359 wanted_cell_pos = Real3(center.y, -center.x, center.z);
360 wanted_node_pos = Real3(node_pos.y, -node_pos.x, node_pos.z);
361 } else if (dir==MD_DirZ){
362 // TODO: à vérifier pour Y et Z
363 wanted_cell_pos = Real3(center.z, -center.y, center.x);
364 wanted_node_pos = Real3(node_pos.z, -node_pos.y, node_pos.x);
365 }
366 bool is_top = ((wanted_cell_pos.z > wanted_node_pos.z) && mesh_dim==3);
367 if (!is_top){
368 if (wanted_cell_pos.x > wanted_node_pos.x ){
369 if (wanted_cell_pos.y > wanted_node_pos.y )
370 indexes_ptr[CNP_NextLeft] = bi;
371 else
372 indexes_ptr[CNP_NextRight] = bi;
373 }
374 else{
375 if (wanted_cell_pos.y > wanted_node_pos.y )
376 indexes_ptr[CNP_PreviousLeft] = bi;
377 else
378 indexes_ptr[CNP_PreviousRight] = bi;
379 }
380 }
381 else{
382 if (wanted_cell_pos.x > wanted_node_pos.x ){
383 if (wanted_cell_pos.y > wanted_node_pos.y )
384 indexes_ptr[CNP_TopNextLeft] = bi;
385 else
386 indexes_ptr[CNP_TopNextRight] = bi;
387 }
388 else{
389 if (wanted_cell_pos.y > wanted_node_pos.y )
390 indexes_ptr[CNP_TopPreviousLeft] = bi;
391 else
392 indexes_ptr[CNP_TopPreviousRight] = bi;
393 }
394 }
395 }
396 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
397 }
398}
399void NodeDirectionMng::
400_computeNodeCellInfos() const
401{
402 Ref<ICartesianMeshNumberingMngInternal> numbering = m_p->m_cartesian_mesh->_internalApi()->cartesianMeshNumberingMngInternal();
403
404 IndexType indexes_ptr[8];
405 ArrayView indexes(8, indexes_ptr);
406
407 NodeGroup dm_all_nodes = this->allNodes();
408 eMeshDirection dir = m_direction;
409 IMesh* mesh = m_p->m_cartesian_mesh->mesh();
410 Integer mesh_dim = mesh->dimension();
411
412 if (mesh_dim == 2) {
413 constexpr Integer nb_cells_max = 4;
414
415 Int64 uids[nb_cells_max];
416 ArrayView av_uids(nb_cells_max, uids);
417
418 // DirX (Previous->X=0 / Next->X=1 / Right->Y=0 / Left->Y=1)
419 // DirY (Previous->Y=0 / Next->Y=1 / Right->X=1 / Left->X=0)
420
421 // Le CartesianMeshNumberingMng nous donne toujours les mailles autour du noeud dans le même ordre :
422 //
423 // |2|3|
424 // .
425 // |0|1|
426 //
427 // y
428 // ^
429 // |->x
430 //
431 // Lire : le UID de la maille dans le tableau av_uids à la position 0 rempli par
432 // "numbering->cellUniqueIdsAroundNode(av_uids, node)" correspond, dans la direction X,
433 // à la position CNP_PreviousRight.
434 constexpr Int32 dir_x_pos_2d[nb_cells_max] = { CNP_PreviousRight, CNP_NextRight, CNP_PreviousLeft, CNP_NextLeft };
435 constexpr Int32 dir_y_pos_2d[nb_cells_max] = { CNP_PreviousLeft, CNP_PreviousRight, CNP_NextLeft, CNP_NextRight };
436
437 ENUMERATE_ (Node, inode, dm_all_nodes) {
438 Node node = *inode;
439 numbering->cellUniqueIdsAroundNode(av_uids, node);
440 Integer nb_cell = node.nbCell();
441
442 indexes.fill(DirNode::NULL_CELL);
443
444 for (Integer i = 0; i < nb_cell; ++i) {
445 Cell cell = node.cell(i);
446 Integer pos = 0;
447 for (; pos < nb_cells_max; ++pos) {
448 if (cell.uniqueId() == av_uids[pos])
449 break;
450 }
451 if (pos == nb_cells_max)
452 continue;
453
454 const IndexType bi = (IndexType)i;
455 if (dir == MD_DirX) {
456 indexes[dir_x_pos_2d[pos]] = bi;
457 }
458 else if (dir == MD_DirY) {
459 indexes[dir_y_pos_2d[pos]] = bi;
460 }
461 }
462 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
463 }
464 }
465 else if (mesh_dim == 3) {
466 constexpr Integer nb_cells_max = 8;
467
468 Int64 uids[nb_cells_max];
469 ArrayView av_uids(nb_cells_max, uids);
470
471 // DirX (Top->Z=1 / Previous->X=0 / Next->X=1 / Right->Y=0 / Left->Y=1)
472 // DirY (Top->Z=1 / Previous->Y=0 / Next->Y=1 / Right->X=1 / Left->X=0)
473 // DirZ (Top->Y=1 / Previous->Z=0 / Next->Z=1 / Right->X=1 / Left->X=0)
474
475 // Le CartesianMeshNumberingMng nous donne toujours les mailles autour du noeud dans le même ordre :
476 //
477 // z = 0 | z = 1
478 // |2|3| | |6|7|
479 // . | .
480 // |0|1| | |4|5|
481 //
482 // y
483 // ^
484 // |->x
485 //
486 // Lire : le UID de la maille dans le tableau av_uids à la position 2 rempli par
487 // "numbering->cellUniqueIdsAroundNode(av_uids, node)" correspond, dans la direction Z,
488 // à la position CNP_TopPreviousLeft.
489 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 };
490 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 };
491 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 };
492
493 ENUMERATE_ (Node, inode, dm_all_nodes) {
494 Node node = *inode;
495 numbering->cellUniqueIdsAroundNode(av_uids, node);
496 Integer nb_cell = node.nbCell();
497
498 indexes.fill(DirNode::NULL_CELL);
499
500 for (Integer i = 0; i < nb_cell; ++i) {
501 Cell cell = node.cell(i);
502 Integer pos = 0;
503 for (; pos < nb_cells_max; ++pos) {
504 if (cell.uniqueId() == av_uids[pos])
505 break;
506 }
507 if (pos == nb_cells_max)
508 continue;
509
510 const IndexType bi = (IndexType)i;
511
512 if (dir == MD_DirX) {
513 indexes[dir_x_pos_3d[pos]] = bi;
514 }
515 else if (dir == MD_DirY) {
516 indexes[dir_y_pos_3d[pos]] = bi;
517 }
518 else if (dir == MD_DirZ) {
519 indexes[dir_z_pos_3d[pos]] = bi;
520 }
521
522 m_infos_view[node.localId()].setCellIndexes(indexes_ptr);
523 }
524 }
525 }
526 else {
527 ARCANE_FATAL("Invalid mesh dimension '{0}'. Valid dimensions are 2 or 3", mesh_dim);
528 }
529}
530
531/*---------------------------------------------------------------------------*/
532/*---------------------------------------------------------------------------*/
533
535allNodes() const
536{
537 return m_p->m_all_items;
538}
539
540/*---------------------------------------------------------------------------*/
541/*---------------------------------------------------------------------------*/
542
544overallNodes() const
545{
546 return m_p->m_overall_all_items;
547}
548
549/*---------------------------------------------------------------------------*/
550/*---------------------------------------------------------------------------*/
551
553inPatchNodes() const
554{
555 return m_p->m_inpatch_all_items;
556}
557
558/*---------------------------------------------------------------------------*/
559/*---------------------------------------------------------------------------*/
560
562innerNodes() const
563{
564 return m_p->m_inner_all_items;
565}
566
567/*---------------------------------------------------------------------------*/
568/*---------------------------------------------------------------------------*/
569
571outerNodes() const
572{
573 return m_p->m_outer_all_items;
574}
575
576/*---------------------------------------------------------------------------*/
577/*---------------------------------------------------------------------------*/
578
579} // End namespace Arcane
580
581/*---------------------------------------------------------------------------*/
582/*---------------------------------------------------------------------------*/
#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.
Infos sur les mailles d'une direction spécifique X,Y ou Z d'un maillage structuré.
CellGroup allCells() const
Groupe de toutes les mailles dans la direction.
DirCellNode cellNode(Cell c) const
Maille avec infos directionnelles aux noeuds correspondant à la maille c.
Maille d'un maillage.
Definition Item.h:1214
Maille avec info directionnelle des noeuds.
Interface d'un maillage cartésien.
virtual IMesh * mesh() const =0
Maillage associé à ce maillage cartésien.
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).
IItemFamily * itemFamily() const
Famille d'entité à laquelle appartient ce groupe (0 pour le group nul)
Definition ItemGroup.h:123
IMesh * mesh() const
Maillage auquel appartient ce groupe (0 pour le group nul)
Definition ItemGroup.h:126
NodeGroup innerNodes() const
Groupe de tous les noeuds internes dans la direction.
NodeDirectionMng()
Créé une instance vide.
NodeGroup outerNodes() const
Groupe de tous les noeuds externes 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.
NodeGroup overallNodes() const
Groupe de tous les noeuds de recouvrement 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
Vecteur 1D de données avec sémantique par valeur (style STL).
void resize(Int64 s)
Change le nombre d'éléments du tableau à s.
__host__ __device__ void fill(T o)
Remplit le tableau avec la valeur o.
Definition Span.h:381
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:357
@ Cell
Le maillage est AMR par maille.
Definition MeshKind.h:52
std::int32_t Int32
Type entier signé sur 32 bits.