Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
IMesh.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/* IMesh.h (C) 2000-2024 */
9/* */
10/* Interface of a mesh. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IMESH_H
13#define ARCANE_CORE_IMESH_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
19#include "arcane/core/IMeshBase.h"
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30class IParallelMng;
33class XmlNode;
34class IMeshUtilities;
35class IMeshModifier;
36class IMeshMng;
37class Properties;
40class IUserData;
41class IUserDataList;
42class IGhostLayerMng;
43class IMeshChecker;
44class IMeshCompactMng;
45class MeshPartInfo;
47class MeshHandle;
48class IVariableMng;
49class ItemTypeMng;
51class MeshEventArgs;
52enum class eMeshEventType;
53
54/*---------------------------------------------------------------------------*/
55/*---------------------------------------------------------------------------*/
56
57//INFO: The complete documentation is in Mesh.dox
58class IMesh
59: public IMeshBase
60{
61 public:
62
63 virtual ~IMesh() = default; //<! Releases resources
64
65 public:
66
67 virtual void build() = 0;
68
70 virtual String factoryName() const = 0;
71
74
77
79 virtual void checkValidMesh() = 0;
80
92 virtual void checkValidMeshFull() = 0;
93
100
101 public:
102
108 virtual bool isAllocated() = 0;
109
117 virtual Int64 timestamp() = 0;
118
119 public:
120
122 ARCANE_DEPRECATED_LONG_TERM("Y2020: Do not use this method. Try to get 'ISubDomain' from another way")
123 virtual ISubDomain* subDomain() = 0;
124
125 public:
126
128 virtual IParallelMng* parallelMng() = 0;
129
130 public:
131
133
135
139
142
144 virtual CellGroup allLevelCells(const Integer& level) = 0;
145
147 virtual CellGroup ownLevelCells(const Integer& level) = 0;
148
151
154
157
160
161 public:
162
165
167 virtual ItemGroup findGroup(const String& name) = 0;
168
170 virtual void destroyGroups() = 0;
171
172 public:
173
174 virtual MeshItemInternalList* meshItemInternalList() = 0;
175
176 public:
177
178 virtual void updateGhostLayers(bool remove_old_ghost) = 0;
179
184 ARCANE_DEPRECATED_240 virtual void serializeCells(ISerializer* buffer, Int32ConstArrayView cells_local_id) = 0;
185
187 virtual void prepareForDump() = 0;
188
190 virtual void initializeVariables(const XmlNode& init_node) = 0;
191
199 virtual void setCheckLevel(Integer level) = 0;
200
202 virtual Integer checkLevel() const = 0;
203
205 virtual bool isDynamic() const = 0;
206
208 virtual bool isAmrActivated() const = 0;
209
210 public:
211
213
214
215 virtual void computeTiedInterfaces(const XmlNode& mesh_node) = 0;
216
218 virtual bool hasTiedInterface() = 0;
219
223
226
227 public:
228
230 virtual IMeshUtilities* utilities() = 0;
231
233 virtual Properties* properties() = 0;
234
235 public:
236
238 virtual IMeshModifier* modifier() = 0;
239
240 public:
241
249
251
256 virtual void defineParentForBuild(IMesh* mesh, ItemGroup group) = 0;
257
263 virtual IMesh* parentMesh() const = 0;
264
270 virtual ItemGroup parentGroup() const = 0;
271
273 virtual void addChildMesh(IMesh* sub_mesh) = 0;
274
276 virtual MeshCollection childMeshes() const = 0;
278
279 public:
280
289 virtual bool isPrimaryMesh() const = 0;
290
298
299 public:
300
303
305 virtual const IUserDataList* userDataList() const = 0;
306
307 public:
308
310 virtual IGhostLayerMng* ghostLayerMng() const = 0;
311
313 virtual IMeshUniqueIdMng* meshUniqueIdMng() const = 0;
314
316 virtual IMeshChecker* checker() const = 0;
317
319 virtual const MeshPartInfo& meshPartInfo() const = 0;
320
322 virtual bool useMeshItemFamilyDependencies() const = 0;
323
326
329
331 virtual const MeshKind meshKind() const = 0;
332
333 public:
334
337
338 public:
339
342
348
349 public:
350
352 virtual IMeshMng* meshMng() const = 0;
353
355 virtual IVariableMng* variableMng() const = 0;
356
358 virtual ItemTypeMng* itemTypeMng() const = 0;
359
360 public:
361
371 virtual void computeSynchronizeInfos() = 0;
372
373 public:
374
377};
378
379/*---------------------------------------------------------------------------*/
380/*---------------------------------------------------------------------------*/
381
382} // End namespace Arcane
383
384/*---------------------------------------------------------------------------*/
385/*---------------------------------------------------------------------------*/
386
387#endif
Declarations of Arcane's general types.
Interface of a builder for "extraordinary" ghost cells.
Interface of the manager for indexed incremental item connectivities.
virtual String name() const =0
Mesh name.
Interface for mesh verification methods.
Interface for managing the compaction of mesh families.
Internal part of IMesh.
Mesh manager interface.
Definition IMeshMng.h:41
Mesh modification interface.
Interface of a mesh partitioning constraint manager.
Interface of a class providing utility functions on meshes.
virtual void checkValidMeshFull()=0
Mesh validity check.
virtual ItemGroup parentGroup() const =0
Parent group.
virtual VariableNodeReal3 & nodesCoordinates()=0
Node coordinates.
virtual IIndexedIncrementalItemConnectivityMng * indexedConnectivityMng()=0
Interface of the indexed incremental connectivity manager.
virtual IParallelMng * parallelMng()=0
Parallelism manager.
virtual IMeshUniqueIdMng * meshUniqueIdMng() const =0
Unique ID numbering manager.
virtual MeshCollection childMeshes() const =0
List of sub-meshes of the current mesh.
virtual IMeshChecker * checker() const =0
Checker interface.
virtual ItemInternalList itemsInternal(eItemKind)=0
Internal array of mesh elements of type type.
virtual void initializeVariables(const XmlNode &init_node)=0
Initializes variables with values from the configuration file (internal).
virtual IMeshModifier * modifier()=0
Associated modifier interface.
virtual void defineParentForBuild(IMesh *mesh, ItemGroup group)=0
Defines the parent mesh and group.
virtual InternalConnectivityPolicy _connectivityPolicy() const =0
Connectivity usage policy.
virtual FaceGroup outerActiveFaces()=0
Group of all active faces on the boundary.
virtual ARCANE_DEPRECATED_240 void serializeCells(ISerializer *buffer, Int32ConstArrayView cells_local_id)=0
virtual bool useMeshItemFamilyDependencies() const =0
check if the network itemFamily dependencies is activated
virtual VariableScalarInteger connectivity()=0
Connectivity descriptor.
virtual void destroyGroups()=0
Destroys all groups of all families.
virtual IMeshUtilities * utilities()=0
Associated utility functions interface.
virtual TiedInterfaceCollection tiedInterfaces()=0
List of semi-conforming interfaces.
virtual IMesh * parentMesh() const =0
Access to the parent mesh.
virtual CellGroup allLevelCells(const Integer &level)=0
Group of all cells of level level.
virtual void computeSynchronizeInfos()=0
Recalculates synchronization information.
virtual SharedVariableNodeReal3 sharedNodesCoordinates()=0
Node coordinates.
virtual IUserDataList * userDataList()=0
Associated user data manager.
virtual FaceGroup innerActiveFaces()=0
Group of all active faces.
virtual void synchronizeGroupsAndVariables()=0
Synchronizes all mesh groups and variables.
virtual ItemGroupCollection groups()=0
List of groups.
virtual ItemGroup findGroup(const String &name)=0
Returns the group with name name or a null group if none exists.
virtual String factoryName() const =0
Name of the factory used to create the mesh.
virtual void setCheckLevel(Integer level)=0
Sets the mesh check level.
virtual IMeshInternal * _internalApi()=0
Internal Arcane API.
virtual CellGroup allActiveCells()=0
ARCANE_DEPRECATED_LONG_TERM("Y2020: Do not use this method. Try to get 'ISubDomain' from another way") virtual ISubDomain *subDomain()=0
Associated subdomain.
virtual FaceGroup allActiveFaces()=0
Group of all active faces.
virtual Int64 timestamp()=0
Counter indicating the time of the last mesh modification.
virtual EventObservable< const MeshEventArgs & > & eventObservable(eMeshEventType type)=0
Observable for an event.
virtual const MeshKind meshKind() const =0
Mesh characteristics.
virtual ItemTypeMng * itemTypeMng() const =0
Associated entity type manager.
virtual void prepareForDump()=0
Prepares the instance for dumping.
virtual IMeshPartitionConstraintMng * partitionConstraintMng()=0
Manager of partitioning constraints associated with this mesh.
virtual CellGroup ownActiveCells()=0
Group of all active cells specific to the domain.
virtual IMeshMng * meshMng() const =0
Associated mesh manager.
virtual bool isAllocated()=0
True if the mesh is allocated.
virtual CellGroup ownLevelCells(const Integer &level)=0
Group of all cells specific to the domain of level level.
virtual IPrimaryMesh * toPrimaryMesh()=0
Returns the instance in the form of an IPrimaryMesh.
virtual IGhostLayerMng * ghostLayerMng() const =0
Associated ghost layer manager.
virtual bool isDynamic() const =0
Indicates if the mesh is dynamic (can evolve).
virtual void checkValidMesh()=0
Check for the validity of internal mesh structures (internal).
virtual Properties * properties()=0
Properties associated with this mesh.
virtual FaceGroup ownActiveFaces()=0
Group of all active faces specific to the domain.
virtual void computeTiedInterfaces(const XmlNode &mesh_node)=0
Determines the semi-conforming interfaces.
virtual void addChildMesh(IMesh *sub_mesh)=0
Adds a sub-mesh to the parent mesh.
virtual bool isPrimaryMesh() const =0
Indicates if the instance is a primary mesh.
virtual IItemFamilyNetwork * itemFamilyNetwork()=0
Family network interface (connected families).
virtual IMeshCompactMng * _compactMng()=0
virtual Integer checkLevel() const =0
Current check level.
virtual IVariableMng * variableMng() const =0
Associated variable manager.
virtual bool hasTiedInterface()=0
True if semi-conforming interfaces exist in the mesh.
virtual const MeshPartInfo & meshPartInfo() const =0
Mesh part information.
Interface of the parallelism manager for a subdomain.
Interface of a particle exchanger.
Interface of the subdomain manager.
Definition ISubDomain.h:75
Interface of a list that manages user data.
Interface for user data attached to another object.
Definition IUserData.h:33
Variable manager interface.
Mesh entity group.
Definition ItemGroup.h:51
Mesh entity type manager.
Definition ItemTypeMng.h:66
Arguments for mesh events.
Definition MeshEvents.h:44
Handle on a mesh.
Definition MeshHandle.h:48
Indirection tables for mesh entities.
Characteristics of a mesh.
Definition MeshKind.h:113
Information about a partitioned mesh.
List of properties.
Definition Properties.h:65
Node of a DOM tree.
Definition XmlNode.h:51
ItemGroupT< Cell > CellGroup
Group of cells.
Definition ItemTypes.h:184
ItemGroupT< Face > FaceGroup
Group of faces.
Definition ItemTypes.h:179
MeshVariableScalarRefT< Node, Real3 > VariableNodeReal3
Coordinate type quantity at node.
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
ConstArrayView< ItemInternal * > ItemInternalList
Type of the internal list of entities.
Definition ItemTypes.h:466
eMeshEventType
Events generated by IMesh.
Definition MeshEvents.h:30
SharedMeshVariableScalarRefT< Node, Real3 > SharedVariableNodeReal3
Quantity at the node of coordinate type.
eItemKind
Mesh entity type.
Collection< IMesh * > MeshCollection
Collection of meshes.
InternalConnectivityPolicy
Connectivity usage policy.
Definition ItemTypes.h:517
Collection< ITiedInterface * > TiedInterfaceCollection
Collection of tied interfaces.