Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
DynamicMesh.h
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/* DynamicMesh.h (C) 2000-2025 */
9/* */
10/* Class for managing an adaptive mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_MESH_DYNAMICMESH_H
13#define ARCANE_MESH_DYNAMICMESH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17#include "arcane/utils/TraceAccessor.h"
18#include "arcane/utils/PerfCounterMng.h"
19#include "arcane/utils/ArgumentException.h"
20#include "arcane/utils/List.h"
21
22#include "arcane/core/IMeshModifier.h"
23#include "arcane/core/IPrimaryMesh.h"
24#include "arcane/core/IItemFamily.h"
25#include "arcane/core/IItemFamilyModifier.h"
26#include "arcane/core/ObserverPool.h"
27#include "arcane/core/MeshPartInfo.h"
28#include "arcane/core/IItemFamilyNetwork.h"
29#include "arcane/core/MeshHandle.h"
30#include "arcane/core/IMeshInitialAllocator.h"
31#include "arcane/core/MeshKind.h"
32
33#include "arcane/mesh/SubMeshTools.h"
34#include "arcane/mesh/MeshVariables.h"
35#include "arcane/mesh/NewWithLegacyConnectivity.h"
36#include "arcane/mesh/MeshEventsImpl.h"
37
38#include <functional>
39#include <memory>
40
41/*---------------------------------------------------------------------------*/
42/*---------------------------------------------------------------------------*/
43
44namespace Arcane
45{
46class IVariableMng;
47class Properties;
48class IUserDataList;
51class IMeshCompactMng;
54} // namespace Arcane
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59namespace Arcane::mesh
60{
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
67class ItemMemoryReferenceMng;
68class MeshTiedInterface;
69class TiedInterface;
72class NodeFamily;
73class EdgeFamily;
74class FaceFamily;
75class CellFamily;
76class DulaNodeFamily;
78class MeshRefinement;
82
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
91class ARCANE_MESH_EXPORT DynamicMesh
92: public MeshVariables
93, public TraceAccessor
94, public IPrimaryMesh
95, public IMeshModifier
98{
99 private:
100
101 friend DynamicMeshInternal;
102
103 // TEMPORARY
104 friend DynamicMeshMergerHelper;
105
106 public:
107
108 typedef ItemInternal* ItemInternalPtr;
109 typedef List<IItemFamily*> ItemFamilyList;
110
111 class InitialAllocator
112 : public IMeshInitialAllocator
113 {
114 public:
115
116 InitialAllocator(DynamicMesh* m)
117 : m_mesh(m)
118 {}
120 {
121 return m_mesh;
122 }
124 {
125 return m_mesh;
126 }
127
128 private:
129
130 DynamicMesh* m_mesh;
131 };
132
133#ifdef ACTIVATE_PERF_COUNTER
134 struct PerfCounter
135 {
136 typedef enum
137 {
138 UPGHOSTLAYER1,
139 UPGHOSTLAYER2,
140 UPGHOSTLAYER3,
141 UPGHOSTLAYER4,
142 UPGHOSTLAYER5,
143 UPGHOSTLAYER6,
144 UPGHOSTLAYER7,
145 NbCounters
146 } eType;
147
148 static const std::string m_names[NbCounters];
149 };
150#endif
151 public:
152
153 void _checkKindRange(eItemKind ik) const // Must be made fatal for particles, dofs and graph ??
154 {
155 if (ik == IK_Node ||
156 ik == IK_Edge ||
157 ik == IK_Face ||
158 ik == IK_Cell ||
159 ik == IK_DoF)
160 return;
161 throw ArgumentException(A_FUNCINFO, "Invalid Range");
162 }
163
164 public:
165
166 DynamicMesh(ISubDomain* sd, const MeshBuildInfo& mbi, bool is_submesh);
167 ~DynamicMesh();
168
169 public:
170
171 void build() override;
172
173 public:
174
175 MeshHandle handle() const override { return m_mesh_handle; }
176 String name() const override { return m_name; }
177 String factoryName() const override { return m_factory_name; }
178
179 IMesh* mesh() override { return this; }
180 Integer dimension() override { return m_mesh_dimension(); }
181 void setDimension(Integer dim) override;
183 Integer nbNode() override;
184 Integer nbEdge() override;
185 Integer nbFace() override;
186 Integer nbCell() override;
187
189 {
190 _checkKindRange(ik);
191 return m_item_families[ik]->nbItem();
192 }
193
194 ItemInternalArrayView itemsInternal(eItemKind ik) override
195 {
196 _checkKindRange(ik);
197 return m_item_families[ik]->itemsInternal();
198 }
199
200 VariableNodeReal3& nodesCoordinates() override;
201 SharedVariableNodeReal3 sharedNodesCoordinates() override;
202
203 public:
204
205 void setEstimatedCells(Integer nb_cell);
206
207 public:
208
209 void exchangeItems() override;
210 void clearItems() override;
211
216 void updateGhostLayers() override;
217 void updateGhostLayers(bool remove_old_ghost) override;
219 void updateGhostLayerFromParent(Array<Int64>& ghost_cell_to_refine,
220 Array<Int64>& cells_to_coarsen,
221 bool remove_old_ghost) override;
222
224 void mergeMeshes(ConstArrayView<IMesh*> meshes) override;
225
226 void addExtraGhostCellsBuilder(IExtraGhostCellsBuilder* builder) override;
227 void removeExtraGhostCellsBuilder(IExtraGhostCellsBuilder* builder) override;
228 void addExtraGhostParticlesBuilder(IExtraGhostParticlesBuilder* builder) override;
229 void removeExtraGhostParticlesBuilder(IExtraGhostParticlesBuilder* builder) override;
230
231 void serializeCells(ISerializer* buffer, Int32ConstArrayView cells_local_id) override;
232 Int32 meshRank() { return m_mesh_part_info.partRank(); }
233
234 void checkValidMesh() override;
235 void checkValidMeshFull() override;
236 void checkValidConnectivity();
237
238 public:
239
240 bool isAllocated() override { return m_is_allocated; }
241
242 void reloadMesh() override;
243
244 void deallocate() override;
245 void allocateCells(Integer mesh_nb_cell, Int64ConstArrayView cells_info, bool one_alloc) override;
246 void endAllocate() override;
247
248 void addCells(Integer nb_cell, Int64ConstArrayView cell_infos, Int32ArrayView cells) override;
249 void addCells(const MeshModifierAddCellsArgs& args) override;
250 void addCells(ISerializer* buffer) override;
251 void addCells(ISerializer* buffer, Int32Array& cells_local_id) override;
252 void addFaces(Integer nb_face, Int64ConstArrayView face_infos, Int32ArrayView faces) override;
253 void addFaces(const MeshModifierAddFacesArgs& args) override;
254 void addEdges(Integer nb_edge, Int64ConstArrayView edge_infos, Int32ArrayView edges) override;
255 void addNodes(Int64ConstArrayView nodes_uid, Int32ArrayView nodes) override;
256 void removeCells(Int32ConstArrayView cells_local_id, bool update_graph) override;
257 void removeCells(Int32ConstArrayView cells_local_id) override
258 {
259 removeCells(cells_local_id, true);
260 }
261 void detachCells(Int32ConstArrayView cells_local_id) override;
262 void removeDetachedCells(Int32ConstArrayView cells_local_id) override;
264 void flagCellToRefine(Int32ConstArrayView cells_lids) override;
265 void flagCellToCoarsen(Int32ConstArrayView cells_lids) override;
266 void refineItems() override;
267 void coarsenItems() override;
268 void coarsenItemsV2(bool update_parent_flag) override;
269 void compact();
270 bool adapt() override;
271 void registerCallBack(IAMRTransportFunctor* f) override;
272 void unRegisterCallBack(IAMRTransportFunctor* f) override;
273 void addHChildrenCells(Cell parent_cell, Integer nb_cell,
274 Int64ConstArrayView cells_infos, Int32ArrayView cells) override;
275
276 void addParentCellToCell(Cell child, Cell parent) override;
277 void addChildCellToCell(Cell parent, Cell child) override;
278
279 void addParentFaceToFace(Face child, Face parent) override;
280 void addChildFaceToFace(Face parent, Face child) override;
281
282 void addParentNodeToNode(Node child, Node parent) override;
283 void addChildNodeToNode(Node parent, Node child) override;
284
285 void endUpdate() override;
286 Int64 timestamp() override { return m_timestamp; }
287
288 bool isPrimaryMesh() const override;
289 IPrimaryMesh* toPrimaryMesh() override;
290
292 const MeshPartInfo& meshPartInfo() const override { return m_mesh_part_info; }
293 void setMeshPartInfo(const MeshPartInfo& mpi) override;
294 IUserDataList* userDataList() override { return m_mesh_handle.meshUserDataList(); }
295 const IUserDataList* userDataList() const override { return m_mesh_handle.meshUserDataList(); }
296
297 IGhostLayerMng* ghostLayerMng() const override { return m_ghost_layer_mng; }
298 IMeshUniqueIdMng* meshUniqueIdMng() const override { return m_mesh_unique_id_mng; }
299 IMeshChecker* checker() const override;
300
301 public:
302
304 {
305 _checkKindRange(ik);
306 return m_item_families[ik]->itemsNewOwner();
307 }
308
309 ItemInternalMap& nodesMap();
310 ItemInternalMap& edgesMap();
311 ItemInternalMap& facesMap();
312 ItemInternalMap& cellsMap();
313
314 void addParentCells(ItemVectorView& items);
315
316 // ItemFamilyNetwork
317 void removeItems(IItemFamily* item_family, Int32ConstArrayView cells_local_id);
318
319 private:
320
321 ISubDomain* m_sub_domain;
322 IMeshMng* m_mesh_mng;
323 MeshHandle m_mesh_handle;
324 IParallelMng* m_parallel_mng;
325 MeshItemInternalList m_item_internal_list;
326 IVariableMng* m_variable_mng;
327 Properties* m_properties;
328 Int64 m_timestamp;
329 bool m_is_allocated;
330 Integer m_dimension;
331 String m_name;
332 String m_factory_name;
333 bool m_need_compact;
334 bool m_has_edge;
335
336 public:
337
338 NodeFamily* m_node_family;
339 EdgeFamily* m_edge_family;
340 FaceFamily* m_face_family;
341 CellFamily* m_cell_family;
342
343 private:
344
345 IMesh* m_parent_mesh;
346 ItemGroupImpl* m_parent_group;
347 UniqueArray<DynamicMesh*> m_child_meshes;
348
349 public:
350
351 NodeFamily& trueNodeFamily() { return *m_node_family; }
352 EdgeFamily& trueEdgeFamily() { return *m_edge_family; }
353 FaceFamily& trueFaceFamily() { return *m_face_family; }
354 CellFamily& trueCellFamily() { return *m_cell_family; }
355
356 public:
357
358 NodeGroup allNodes() override { return allItems(IK_Node); }
359 EdgeGroup allEdges() override { return allItems(IK_Edge); }
360 FaceGroup allFaces() override { return allItems(IK_Face); }
361 CellGroup allCells() override { return allItems(IK_Cell); }
362
363 //TODO: remove this method
364 ItemGroup allItems(eItemKind kind)
365 {
366 _checkKindRange(kind);
367 return m_item_families[kind]->allItems();
368 }
369
370 NodeGroup ownNodes() override { return ownItems(IK_Node); }
371 EdgeGroup ownEdges() override { return ownItems(IK_Edge); }
372 FaceGroup ownFaces() override { return ownItems(IK_Face); }
373 CellGroup ownCells() override { return ownItems(IK_Cell); }
374
375 //TODO: remove this method
376 ItemGroup ownItems(eItemKind kind)
377 {
378 _checkKindRange(kind);
379 return m_item_families[kind]->allItems().own();
380 }
381
382 FaceGroup outerFaces() override;
383
386 CellGroup allActiveCells() override;
387
389 CellGroup ownActiveCells() override;
390
392 CellGroup allLevelCells(const Integer& level) override;
393
395 CellGroup ownLevelCells(const Integer& level) override;
396
398 FaceGroup allActiveFaces() override;
399
401 FaceGroup ownActiveFaces() override;
402
404 FaceGroup innerActiveFaces() override;
405
407 FaceGroup outerActiveFaces() override;
408
409 // void readAmrActivator(const XmlNode& mesh_node) override;
410
411 public:
412
413 MeshItemInternalList* meshItemInternalList() override
414 {
415 return &m_item_internal_list;
416 }
417
418 public:
419
420 ISubDomain* subDomain() override { return m_sub_domain; }
421 IParallelMng* parallelMng() override;
423
424 ItemGroupCollection groups() override;
425
426 void prepareForDump() override;
427 void initializeVariables(const XmlNode& init_node) override;
428 ItemGroup findGroup(const String& name) override;
429 ItemGroup findGroup(const String& name, eItemKind ik, bool create_if_needed);
430 void destroyGroups() override;
431
432 NodeGroup findNodeGroup(const String& aname)
433 {
434 return findGroup(aname, IK_Node, false);
435 }
436 EdgeGroup findEdgeGroup(const String& aname)
437 {
438 return findGroup(aname, IK_Edge, false);
439 }
440 FaceGroup findFaceGroup(const String& aname)
441 {
442 return findGroup(aname, IK_Face, false);
443 }
444 CellGroup findCellGroup(const String& aname)
445 {
446 return findGroup(aname, IK_Cell, false);
447 }
448
449 ItemGroup createGroup(const String& aname, const ItemGroup& parent);
450 ItemGroup createGroup(const String& aname, eItemKind ik);
451
453 bool isAmrActivated() const override
454 {
455 return m_is_amr_activated;
456 }
457
458 public:
459
460 IItemFamily* createItemFamily(eItemKind ik, const String& name) override;
461
462 IItemFamily* findItemFamily(eItemKind ik, const String& name, bool create_if_needed, bool register_modifier_if_created) override;
463 IItemFamily* findItemFamily(const String& name, bool throw_exception = true) override;
464 IItemFamilyModifier* findItemFamilyModifier(eItemKind ik, const String& name) override;
465 void addItemFamilyModifier(IItemFamilyModifier*);
466
468 {
469 _checkKindRange(ik);
470 return m_item_families[ik];
471 }
472 IItemFamily* nodeFamily() override;
473 IItemFamily* edgeFamily() override;
474 IItemFamily* faceFamily() override;
475 IItemFamily* cellFamily() override;
476
477 IItemFamilyCollection itemFamilies() override
478 {
479 return m_item_families;
480 }
481
482 public:
483
484 bool isDynamic() const override
485 {
486 return m_is_dynamic;
487 }
488
489 void setDynamic(bool v) override
490 {
491 m_is_dynamic = v;
492 }
493
494 void setCheckLevel(Integer level) override;
495
496 Integer checkLevel() const override;
497
498 public:
499
500 void computeTiedInterfaces(const XmlNode& xml_node) override;
501 bool hasTiedInterface() override;
502 TiedInterfaceCollection tiedInterfaces() override;
503 IMeshPartitionConstraintMng* partitionConstraintMng() override;
504 ConstArrayView<TiedInterface*> trueTiedInterfaces();
505
506 public:
507
508 IMeshUtilities* utilities() override;
509 IMeshModifier* modifier() override { return this; }
510 Properties* properties() override { return m_properties; }
511 void synchronizeGroupsAndVariables() override;
512
513 public:
514
515 void defineParentForBuild(IMesh* mesh, ItemGroup group) override;
516 IMesh* parentMesh() const override;
517 ItemGroup parentGroup() const override;
518 void addChildMesh(IMesh* sub_mesh) override;
519 IMeshCollection childMeshes() const override;
520
521 void setOwnersFromCells() override { _setOwnersFromCells(); }
522 IMeshCompactMng* _compactMng() override { return m_mesh_compact_mng; }
524 {
525 return m_connectivity_policy;
526 }
527
528 public:
529
530 DynamicMeshIncrementalBuilder* incrementalBuilder() { return m_mesh_builder; }
531 MeshRefinement* meshRefinement() { return m_mesh_refinement; }
532 void endUpdate(bool update_ghost_layer, bool remove_old_ghost) override;
533
534 public:
535
536 bool useMeshItemFamilyDependencies() const override { return m_use_mesh_item_family_dependencies; }
537 IItemFamilyNetwork* itemFamilyNetwork() override { return m_item_family_network; }
538 IIndexedIncrementalItemConnectivityMng* indexedConnectivityMng() override { return m_indexed_connectivity_mng.get(); }
539
540 public:
541
542 IMeshMng* meshMng() const override { return m_mesh_mng; }
543 IVariableMng* variableMng() const override { return m_variable_mng; }
544 ItemTypeMng* itemTypeMng() const override { return m_item_type_mng; }
545
546 void computeSynchronizeInfos() override;
547
548 public:
549
550 IMeshInitialAllocator* initialAllocator() override { return &m_initial_allocator; }
551 void allocate(UnstructuredMeshAllocateBuildInfo& build_info) override;
552 void allocate(CartesianMeshAllocateBuildInfo& build_info) override;
553
554 public:
555
557 {
558 return m_mesh_events.eventObservable(type);
559 }
560
561 public:
562
563 const MeshKind meshKind() const override { return m_mesh_kind; }
564
565 IMeshInternal* _internalApi() override;
566 IMeshModifierInternal* _modifierInternalApi() override;
567
568 private:
569
570 IMeshUtilities* m_mesh_utilities = nullptr;
571
572 public:
573
574 DynamicMeshIncrementalBuilder* m_mesh_builder = nullptr;
575
576 private:
577
578 DynamicMeshChecker* m_mesh_checker = nullptr;
579 SubMeshTools* m_submesh_tools = nullptr;
582 NewItemOwnerBuilder* m_new_item_owner_builder = nullptr;
583 ExtraGhostCellsBuilder* m_extra_ghost_cells_builder = nullptr;
584 ExtraGhostParticlesBuilder* m_extra_ghost_particles_builder = nullptr;
585 InitialAllocator m_initial_allocator;
586 std::unique_ptr<DynamicMeshInternal> m_internal_api;
587
588 private:
589
591 bool m_is_amr_activated = false;
592 eMeshAMRKind m_amr_type;
593
594 bool m_is_dynamic = false;
595
598
600 ItemFamilyList m_item_families;
601
604 UniqueArray<IItemFamilyModifier*> m_family_modifiers; // used for item family network
605
606 ObserverPool m_observer_pool;
607 TiedInterfaceMng* m_tied_interface_mng = nullptr;
608 bool m_is_sub_connectivity_set = false;
609 bool m_tied_interface_need_prepare_dump = false;
610
611 MeshPartitionConstraintMng* m_partition_constraint_mng = nullptr;
612 IGhostLayerMng* m_ghost_layer_mng = nullptr;
613 IMeshUniqueIdMng* m_mesh_unique_id_mng = nullptr;
614 IMeshExchangeMng* m_mesh_exchange_mng = nullptr;
615 IMeshCompactMng* m_mesh_compact_mng = nullptr;
616
617#ifdef ACTIVATE_PERF_COUNTER
618 PerfCounterMng<PerfCounter> m_perf_counter;
619#endif
620
621 InternalConnectivityPolicy m_connectivity_policy;
622 MeshPartInfo m_mesh_part_info;
623
624 bool m_use_mesh_item_family_dependencies = false;
625 IItemFamilyNetwork* m_item_family_network = nullptr;
626 ItemTypeMng* m_item_type_mng = nullptr;
627 std::unique_ptr<IIndexedIncrementalItemConnectivityMng> m_indexed_connectivity_mng;
628 MeshKind m_mesh_kind;
629 bool m_do_not_save_need_compact = false;
630
631 MeshEventsImpl m_mesh_events;
632
633 private:
634
635 void _printMesh(std::ostream& ostr);
636 void _allocateCells(Integer mesh_nb_cell,
637 Int64ConstArrayView cells_info,
639 bool allow_build_face = true);
640
641 const char* _className() const { return "Mesh"; }
642
643 void _allocateCells2(DynamicMeshIncrementalBuilder* mib);
644 void _itemsUniqueIdsToLocalIdsSorted(eItemKind item_kind, ArrayView<Integer> ids);
645 void _prepareForDump();
646 void _prepareForDumpReal();
647 void _readFromDump();
648
649 void _setOwnersFromCells();
650 // The _synchronizeXXX methods are not recursive on sub-meshes
651 void _synchronizeGroupsAndVariables();
652 void _synchronizeGroups();
653 void _synchronizeVariables();
654 void _writeMesh(const String& base_name);
655 void _removeGhostItems();
656 // AMR
657 void _removeGhostChildItems();
658 void _removeGhostChildItems2(Array<Int64>& cells_to_coarsen);
659 void _checkAMR() const;
660
661 void _sortInternalReferences();
662 void _finalizeMeshChanged();
663 void _compactItemInternalReferences();
664 void _compactItems(bool do_sort, bool compact_variables_and_groups);
665 void _checkValidItem(ItemInternal* item);
666
667 void _computeSynchronizeInfos();
668 void _computeFamilySynchronizeInfos();
669 void _computeGroupSynchronizeInfos();
670 void _exchangeItems(bool do_compact);
671 void _exchangeItemsNew();
672 void _checkDimension() const;
673 void _checkConnectivity();
674 void _writeCells(const String& filename);
675
676 void _prepareTiedInterfacesForDump();
677 void _readTiedInterfacesFromDump();
678 void _applyTiedInterfaceStructuration(TiedInterface* tied_interface);
679 void _deleteTiedInterfaces();
680
681 void _multipleExchangeItems(Integer nb_exchange, Integer version, bool do_compact);
682 void _addCells(ISerializer* buffer, Int32Array* cells_local_id);
683 void _setSubConnectivity();
684 void _setDimension(Integer dim);
685 void _internalUpdateGhost(bool update_ghost_layer, bool remove_old_ghost);
686 void _internalEndUpdateInit(bool update_sync_info);
687 void _internalEndUpdateResizeVariables();
688 void _internalEndUpdateFinal(bool print_stat);
689
690 void _computeExtraGhostCells();
691 void _computeExtraGhostParticles();
692
693 void _notifyEndUpdateForFamilies();
694 ItemFamily* _createNewFamily(eItemKind kind, const String& name);
695
696 void _saveProperties();
697 void _loadProperties();
698 void _addFamily(ItemFamily* true_family);
699
700 void _buildAndInitFamily(IItemFamily* family);
701 IItemFamilyPolicyMng* _createFamilyPolicyMng(ItemFamily* family);
702 void _applyCompactPolicy(const String& timer_name,
703 std::function<void(IItemFamilyCompactPolicy*)> functor);
704 void _updateGroupsAfterRemove();
705 void _printConnectivityPolicy();
706
707 // Add a dependency (downward adjacencies only) between two families: i.e., the source family
708 // is built on the target family (e.g., a cell owns its nodes)
709 template <class SourceFamily, class TargetFamily>
710 void _addDependency(SourceFamily* source_family, TargetFamily* target_family)
711 {
712 typedef typename NewWithLegacyConnectivityType<SourceFamily, TargetFamily>::type CType;
713 String name = String::format("{0}{1}", source_family->name(), target_family->name());
714 auto connectivity = new CType(source_family, target_family, name);
715 m_item_family_network->addDependency(source_family, target_family, connectivity);
716 }
717
718 // Add a relation: source family "sees" target family (e.g., a face sees its cells). Often upward adjacencies.
719 template <class SourceFamily, class TargetFamily>
720 void _addRelation(SourceFamily* source_family, TargetFamily* target_family)
721 {
722 typedef typename NewWithLegacyConnectivityType<SourceFamily, TargetFamily>::type CType;
723 String name = String::format("{0}{1}", source_family->name(), target_family->name());
724 auto connectivity = new CType(source_family, target_family, name);
725 m_item_family_network->addRelation(source_family, target_family, connectivity);
726 }
727
728 // Update family dependencies with set connectivities
729 void _updateItemFamilyDependencies(VariableScalarInteger connectivity);
730
731 // Serialize Item
732 void _serializeItems(ISerializer* buffer, Int32ConstArrayView item_local_ids, IItemFamily* item_family);
733 void _deserializeItems(ISerializer* buffer, Int32Array* item_local_ids, IItemFamily* item_family);
734 void _fillSerializer(ISerializer* buffer, std::map<String, Int32UniqueArray>& serializedItems);
735};
736
737/*---------------------------------------------------------------------------*/
738/*---------------------------------------------------------------------------*/
739
740} // End namespace Arcane::mesh
741
742/*---------------------------------------------------------------------------*/
743/*---------------------------------------------------------------------------*/
744
745#endif
Modifiable view of an array of type T.
Base class for 1D data vectors.
Information for allocating entities of an unstructured mesh.
Cell of a mesh.
Definition Item.h:1300
Constant view of an array of type T.
Face of a cell.
Definition Item.h:1032
Interface of a functor with argument.
Interface of a builder for "extraordinary" ghost cells.
Interface of a builder for "extraordinary" ghost cells.
Interface of the manager for indexed incremental item connectivities.
Interface for modifying a family.
virtual void addDependency(IItemFamily *master_family, IItemFamily *slave_family, IIncrementalItemConnectivity *slave_to_master_connectivity, bool is_deep_connectivity=true)=0
Adds a dependency between two families; an element of master_family is composed of elements of slave_...
virtual void addRelation(IItemFamily *source_family, IItemFamily *target_family, IIncrementalItemConnectivity *source_to_target_connectivity)=0
Adds a relation between two families; an element of source_family is connected to one or more element...
Interface for entity family policies.
Interface of an entity family.
Definition IItemFamily.h:83
Interface for mesh verification methods.
Interface for managing the compaction of mesh families.
Interface for managing mesh exchanges between subdomains.
Interface for allocating mesh entities.
Internal part of IMesh.
Mesh manager interface.
Definition IMeshMng.h:41
Internal part of IMeshModifier.
Mesh modification interface.
Interface of a mesh partitioning constraint manager.
Interface of a class providing utility functions on meshes.
Interface of the parallelism manager for a subdomain.
Interface of the subdomain manager.
Definition ISubDomain.h:75
Allocator for unstructured meshes.
Interface of a list that manages user data.
Variable manager interface.
Brief: Implementation of a mesh entity group.
Mesh entity group.
Definition ItemGroup.h:51
Internal structure of a mesh entity.
Mesh entity type manager.
Definition ItemTypeMng.h:66
View on a vector of entities.
Implementation of a collection of elements in vector form.
Handle on a mesh.
Definition MeshHandle.h:48
Indirection tables for mesh entities.
Characteristics of a mesh.
Definition MeshKind.h:113
Arguments for IMeshModifier::addCells().
Arguments for IMeshModifier::addFaces().
Information about a partitioned mesh.
Node of a mesh.
Definition Item.h:598
List of observers.
List of properties.
Definition Properties.h:65
TraceAccessor(ITraceMng *m)
Constructs an accessor via the trace manager m.
ITraceMng * traceMng() const
Trace manager.
1D data vector with value semantics (STL style).
Information for allocating entities of an unstructured mesh.
Node of a DOM tree.
Definition XmlNode.h:51
ICartesianMeshInitialAllocator * cartesianMeshAllocator() override
Allocator for Cartesian meshes.
IUnstructuredMeshInitialAllocator * unstructuredMeshAllocator() override
Allocator for unstructured meshes.
bool useMeshItemFamilyDependencies() const override
check if the network itemFamily dependencies is activated
VariableItemInt32 & itemsNewOwner(eItemKind ik) override
Variable containing the identifier of the owning subdomain.
IMeshCompactMng * _compactMng() override
String factoryName() const override
Name of the factory used to create the mesh.
FaceGroup allFaces() override
Group of all faces.
bool isDynamic() const override
Indicates if the mesh is dynamic (can evolve).
UniqueArray< ItemFamily * > m_true_item_families
List of entity family implementations.
bool isAmrActivated() const override
AMR.
ITraceMng * traceMng() override
Associated message manager.
IItemFamily * itemFamily(eItemKind ik) override
Returns the entity family of type ik.
IMesh * mesh() override
Associated mesh.
String name() const override
Mesh name.
IMeshMng * meshMng() const override
Associated mesh manager.
NodeGroup ownNodes() override
Group of all domain-specific nodes.
EdgeGroup ownEdges() override
Group of all domain-specific edges.
IIndexedIncrementalItemConnectivityMng * indexedConnectivityMng() override
Interface of the indexed incremental connectivity manager.
ItemInternalArrayView itemsInternal(eItemKind ik) override
Internal array of mesh elements of type type.
Int64 timestamp() override
Counter indicating the time of the last mesh modification.
IMeshModifier * modifier() override
Associated modifier interface.
const IUserDataList * userDataList() const override
Associated user data manager.
VariableScalarInteger connectivity() override
Connectivity descriptor.
Integer dimension() override
Mesh dimension (1D, 2D, or 3D).
void setDynamic(bool v) override
Sets the property indicating whether the mesh can evolve.
ItemFamilyList m_item_families
List of entity family interfaces.
EdgeGroup allEdges() override
Group of all edges.
const MeshPartInfo & meshPartInfo() const override
Information about mesh parts.
ItemTypeMng * itemTypeMng() const override
Associated entity type manager.
CellGroup allCells() override
Group of all cells.
bool isAllocated() override
True if the mesh is allocated.
IVariableMng * variableMng() const override
Associated variable manager.
IGhostLayerMng * ghostLayerMng() const override
Associated ghost layer manager.
InternalConnectivityPolicy _connectivityPolicy() const override
Connectivity usage policy.
void removeCells(Int32ConstArrayView cells_local_id) override
Removes cells.
FaceGroup ownFaces() override
Group of all domain-specific faces.
Integer nbItem(eItemKind ik) override
Number of elements of type ik.
IMeshInitialAllocator * initialAllocator() override
Specific initial allocator.
const MeshKind meshKind() const override
Mesh characteristics.
Properties * properties() override
Properties associated with this mesh.
CellGroup ownCells() override
Group of all domain-specific cells.
IItemFamilyNetwork * itemFamilyNetwork() override
Family network interface (connected families).
void setOwnersFromCells() override
Positions entity owners based on the cell owner.
IMeshUniqueIdMng * meshUniqueIdMng() const override
Unique ID numbering manager.
NodeGroup allNodes() override
Group of all nodes.
MeshHandle handle() const override
Handle on this mesh.
ItemGroupList m_all_groups
List of entity groups.
MeshRefinement * m_mesh_refinement
AMR.
EventObservable< const MeshEventArgs & > & eventObservable(eMeshEventType type) override
Observable for an event.
IUserDataList * userDataList() override
Associated user data manager.
Construction of additional ghost cells.
Associative array of ItemInternal.
Implementation of mesh events.
Mesh partitioning constraint manager.
Implementation of unstructured mesh refinement adaptation algorithms.
VariableScalarInteger m_mesh_connectivity
Mesh connectivity.
VariableScalarInteger m_mesh_dimension
Mesh dimension.
Implementation of the tied interface manager.
Information on mesh semi-conformities.
ItemGroupT< Cell > CellGroup
Group of cells.
Definition ItemTypes.h:184
ItemGroupT< Face > FaceGroup
Group of faces.
Definition ItemTypes.h:179
ItemGroupT< Edge > EdgeGroup
Group of edges.
Definition ItemTypes.h:174
ItemGroupT< Node > NodeGroup
Group of nodes.
Definition ItemTypes.h:168
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Coordinate type quantity at node.
ItemVariableScalarRefT< Int32 > VariableItemInt32
32-bit integer type quantity
VariableRefScalarT< Integer > VariableScalarInteger
Scalar variable of integer type.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Collection< ItemGroup > ItemGroupCollection
Collection of mesh item groups.
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
ConstArrayView< Int32 > Int32ConstArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:482
List< ItemGroup > ItemGroupList
Array of mesh item groups.
Collection< IItemFamily * > IItemFamilyCollection
Collection of item families.
ConstArrayView< Int64 > Int64ConstArrayView
C equivalent of a 1D array of 64-bit integers.
Definition UtilsTypes.h:480
eMeshEventType
Events generated by IMesh.
Definition MeshEvents.h:30
ArrayView< Int32 > Int32ArrayView
C equivalent of a 1D array of 32-bit integers.
Definition UtilsTypes.h:453
SharedMeshVariableScalarRefT< Node, Real3 > SharedVariableNodeReal3
Quantity at the node of coordinate type.
eItemKind
Mesh entity type.
@ IK_Node
Node mesh entity.
@ IK_Cell
Cell mesh entity.
@ IK_Face
Face mesh entity.
@ IK_Edge
Edge mesh entity.
Array< Int32 > Int32Array
Dynamic one-dimensional array of 32-bit integers.
Definition UtilsTypes.h:127
Collection< IMesh * > IMeshCollection
Collection of meshes.
InternalConnectivityPolicy
Connectivity usage policy.
Definition ItemTypes.h:517
eMeshAMRKind
AMR mesh type.
Definition MeshKind.h:49
Collection< ITiedInterface * > TiedInterfaceCollection
Collection of tied interfaces.
std::int32_t Int32
Signed integer type of 32 bits.