Public Member Functions | |
| virtual VariableNodeReal3 & | nodesCoordinates ()=0 |
| Node coordinates. | |
| virtual void | setDimension (Integer dim)=0 |
| Positions the mesh dimension (1D, 2D, or 3D). | |
| virtual void | reloadMesh ()=0 |
| Reloads the mesh from protected variables. | |
| virtual void | allocateCells (Integer nb_cell, Int64ConstArrayView cells_infos, bool one_alloc=true)=0 |
| Allocation of a mesh. | |
| virtual void | endAllocate ()=0 |
| Indicates the end of cell allocation. | |
| virtual void | deallocate ()=0 |
| Deallocates the mesh. | |
| virtual IMeshInitialAllocator * | initialAllocator () |
| Specific initial allocator. | |
| virtual VariableItemInt32 & | itemsNewOwner (eItemKind kind)=0 |
| Variable containing the identifier of the owning subdomain. | |
| virtual void | exchangeItems ()=0 |
| Changes the owning subdomains of entities. | |
| virtual void | setOwnersFromCells ()=0 |
| Positions entity owners based on the cell owner. | |
| virtual void | setMeshPartInfo (const MeshPartInfo &mpi)=0 |
| Positions partitioning information. | |
| Public Member Functions inherited from Arcane::IMesh | |
| virtual void | build ()=0 |
| virtual String | factoryName () const =0 |
| Name of the factory used to create the mesh. | |
| virtual ItemInternalList | itemsInternal (eItemKind)=0 |
| Internal array of mesh elements of type type. | |
| virtual SharedVariableNodeReal3 | sharedNodesCoordinates ()=0 |
| Node coordinates. | |
| virtual void | checkValidMesh ()=0 |
| Check for the validity of internal mesh structures (internal). | |
| virtual void | checkValidMeshFull ()=0 |
| Mesh validity check. | |
| virtual void | synchronizeGroupsAndVariables ()=0 |
| Synchronizes all mesh groups and variables. | |
| virtual bool | isAllocated ()=0 |
| True if the mesh is allocated. | |
| virtual Int64 | timestamp ()=0 |
| Counter indicating the time of the last mesh modification. | |
| ARCANE_DEPRECATED_LONG_TERM ("Y2020: Do not use this method. Try to get 'ISubDomain' from another way") virtual ISubDomain *subDomain()=0 | |
| Associated subdomain. | |
| virtual IParallelMng * | parallelMng ()=0 |
| Parallelism manager. | |
| virtual VariableScalarInteger | connectivity ()=0 |
| Connectivity descriptor. | |
| virtual CellGroup | allActiveCells ()=0 |
| virtual CellGroup | ownActiveCells ()=0 |
| Group of all active cells specific to the domain. | |
| virtual CellGroup | allLevelCells (const Integer &level)=0 |
Group of all cells of level level. | |
| virtual CellGroup | ownLevelCells (const Integer &level)=0 |
Group of all cells specific to the domain of level level. | |
| virtual FaceGroup | allActiveFaces ()=0 |
| Group of all active faces. | |
| virtual FaceGroup | ownActiveFaces ()=0 |
| Group of all active faces specific to the domain. | |
| virtual FaceGroup | innerActiveFaces ()=0 |
| Group of all active faces. | |
| virtual FaceGroup | outerActiveFaces ()=0 |
| Group of all active faces on the boundary. | |
| 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 void | destroyGroups ()=0 |
| Destroys all groups of all families. | |
| virtual MeshItemInternalList * | meshItemInternalList ()=0 |
| virtual void | updateGhostLayers (bool remove_old_ghost)=0 |
| virtual ARCANE_DEPRECATED_240 void | serializeCells (ISerializer *buffer, Int32ConstArrayView cells_local_id)=0 |
| virtual void | prepareForDump ()=0 |
| Prepares the instance for dumping. | |
| virtual void | initializeVariables (const XmlNode &init_node)=0 |
| Initializes variables with values from the configuration file (internal). | |
| virtual void | setCheckLevel (Integer level)=0 |
| Sets the mesh check level. | |
| virtual Integer | checkLevel () const =0 |
| Current check level. | |
| virtual bool | isDynamic () const =0 |
| Indicates if the mesh is dynamic (can evolve). | |
| virtual bool | isAmrActivated () const =0 |
| virtual void | computeTiedInterfaces (const XmlNode &mesh_node)=0 |
| Determines the semi-conforming interfaces. | |
| virtual bool | hasTiedInterface ()=0 |
| True if semi-conforming interfaces exist in the mesh. | |
| virtual TiedInterfaceCollection | tiedInterfaces ()=0 |
| List of semi-conforming interfaces. | |
| virtual IMeshPartitionConstraintMng * | partitionConstraintMng ()=0 |
| Manager of partitioning constraints associated with this mesh. | |
| virtual IMeshUtilities * | utilities ()=0 |
| Associated utility functions interface. | |
| virtual Properties * | properties ()=0 |
| Properties associated with this mesh. | |
| virtual IMeshModifier * | modifier ()=0 |
| Associated modifier interface. | |
| virtual void | defineParentForBuild (IMesh *mesh, ItemGroup group)=0 |
| Defines the parent mesh and group. | |
| virtual IMesh * | parentMesh () const =0 |
| Access to the parent mesh. | |
| virtual ItemGroup | parentGroup () const =0 |
| Parent group. | |
| virtual void | addChildMesh (IMesh *sub_mesh)=0 |
| Adds a sub-mesh to the parent mesh. | |
| virtual MeshCollection | childMeshes () const =0 |
| List of sub-meshes of the current mesh. | |
| virtual bool | isPrimaryMesh () const =0 |
| Indicates if the instance is a primary mesh. | |
| virtual IPrimaryMesh * | toPrimaryMesh ()=0 |
| Returns the instance in the form of an IPrimaryMesh. | |
| virtual IUserDataList * | userDataList ()=0 |
| Associated user data manager. | |
| virtual const IUserDataList * | userDataList () const =0 |
| Associated user data manager. | |
| virtual IGhostLayerMng * | ghostLayerMng () const =0 |
| Associated ghost layer manager. | |
| virtual IMeshUniqueIdMng * | meshUniqueIdMng () const =0 |
| Unique ID numbering manager. | |
| virtual IMeshChecker * | checker () const =0 |
| Checker interface. | |
| virtual const MeshPartInfo & | meshPartInfo () const =0 |
| Mesh part information. | |
| virtual bool | useMeshItemFamilyDependencies () const =0 |
| check if the network itemFamily dependencies is activated | |
| virtual IItemFamilyNetwork * | itemFamilyNetwork ()=0 |
| Family network interface (connected families). | |
| virtual IIndexedIncrementalItemConnectivityMng * | indexedConnectivityMng ()=0 |
| Interface of the indexed incremental connectivity manager. | |
| virtual const MeshKind | meshKind () const =0 |
| Mesh characteristics. | |
| virtual EventObservable< const MeshEventArgs & > & | eventObservable (eMeshEventType type)=0 |
| Observable for an event. | |
| virtual IMeshCompactMng * | _compactMng ()=0 |
| virtual InternalConnectivityPolicy | _connectivityPolicy () const =0 |
| Connectivity usage policy. | |
| virtual IMeshMng * | meshMng () const =0 |
| Associated mesh manager. | |
| virtual IVariableMng * | variableMng () const =0 |
| Associated variable manager. | |
| virtual ItemTypeMng * | itemTypeMng () const =0 |
| Associated entity type manager. | |
| virtual void | computeSynchronizeInfos ()=0 |
| Recalculates synchronization information. | |
| virtual IMeshInternal * | _internalApi ()=0 |
| Internal Arcane API. | |
| Public Member Functions inherited from Arcane::IMeshBase | |
| virtual MeshHandle | handle () const =0 |
| Handle on this mesh. | |
| virtual String | name () const =0 |
| Mesh name. | |
| virtual Integer | nbNode ()=0 |
| Number of mesh nodes. | |
| virtual Integer | nbEdge ()=0 |
| Number of mesh edges. | |
| virtual Integer | nbFace ()=0 |
| Number of mesh faces. | |
| virtual Integer | nbCell ()=0 |
| Number of mesh cells. | |
| virtual Integer | nbItem (eItemKind ik)=0 |
| Number of elements of type ik. | |
| virtual ITraceMng * | traceMng ()=0 |
| Associated message manager. | |
| virtual Integer | dimension ()=0 |
| Mesh dimension (1D, 2D, or 3D). | |
| virtual NodeGroup | allNodes ()=0 |
| Group of all nodes. | |
| virtual EdgeGroup | allEdges ()=0 |
| Group of all edges. | |
| virtual FaceGroup | allFaces ()=0 |
| Group of all faces. | |
| virtual CellGroup | allCells ()=0 |
| Group of all cells. | |
| virtual NodeGroup | ownNodes ()=0 |
| Group of all domain-specific nodes. | |
| virtual EdgeGroup | ownEdges ()=0 |
| Group of all domain-specific edges. | |
| virtual FaceGroup | ownFaces ()=0 |
| Group of all domain-specific faces. | |
| virtual CellGroup | ownCells ()=0 |
| Group of all domain-specific cells. | |
| virtual FaceGroup | outerFaces ()=0 |
| Group of all faces on the boundary. | |
| virtual IItemFamily * | createItemFamily (eItemKind ik, const String &name)=0 |
| Create a particle family named name. | |
| virtual IItemFamily * | findItemFamily (eItemKind ik, const String &name, bool create_if_needed=false, bool register_modifier_if_created=false)=0 |
| Returns the family named name. | |
| virtual IItemFamily * | findItemFamily (const String &name, bool throw_exception=false)=0 |
| Returns the family named name. | |
| virtual IItemFamilyModifier * | findItemFamilyModifier (eItemKind ik, const String &name)=0 |
| Returns the IItemFamilyModifier interface for the family named name and of type ik. | |
| virtual IItemFamily * | itemFamily (eItemKind ik)=0 |
| Returns the entity family of type ik. | |
| virtual IItemFamily * | nodeFamily ()=0 |
| Returns the node family. | |
| virtual IItemFamily * | edgeFamily ()=0 |
| Returns the edge family. | |
| virtual IItemFamily * | faceFamily ()=0 |
| Returns the face family. | |
| virtual IItemFamily * | cellFamily ()=0 |
| Returns the cell family. | |
| virtual IItemFamilyCollection | itemFamilies ()=0 |
Interface of a primary mesh.
Primary mesh instances are created either when reading the dataset, or by programming, by calling one of the IMainFactory::createMesh() methods. Currently, it is not possible to delete a primary mesh.
For example, to create an empty 2D mesh named "Mesh2":
The created mesh exists across all ranks of the IParallelMng passed as an argument. To create a mesh on a single processor, you can use IParallelMng::sequentialParallelMng().
It is also possible to read a mesh directly from a file using an implementation of IMeshReader. For example, to read a file in the historical Vtk format:
It is possible to modify the mesh later via the IMeshModifier interface, which can be retrieved by modifier(). Once modifications are made, you must call the endUpdate() method.
A mesh has certain properties, accessible via properties(). The following properties are valid:
Definition at line 42 of file IPrimaryMesh.h.
|
inlinevirtual |
Definition at line 47 of file IPrimaryMesh.h.
|
pure virtual |
Allocation of a mesh.
Creation of an arbitrary mesh.
This method is the most generic of the mesh creation methods. It is used when you only know the cells and the list of their nodes based on their unique global number.
This operation allocates the structures for the mesh containing a number of cells equal to nb_cell, the cells being described by the array cells_infos.
Since the node numbers are unique numbers, their value can be arbitrary: it is not necessary to start at zero, nor must the numbers be consecutive. The implementation handles determining the number of nodes in the mesh.
For example, if we have two cells, the first of type IT_Hexaedron8, with unique number 23, and the second of type IT_Tetraedron4 with unique number 45, the array cells_infos will contain 16 elements, distributed as follows:
If nb_cell is zero and cells_infos is not empty, the number of cells is determined dynamically. The array cells_infos is iterated until the end of the array is reached or a cell of type IT_NullType is encountered.
If one_alloc is true, the endAllocate() operation is called to indicate that no other cells will be added. It is possible to allocate the mesh in several steps by setting one_alloc to false and calling endAllocate() at the end.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
|
pure virtual |
Deallocates the mesh.
This deletes all entities and all entity groups. The mesh must then be reallocated via the call to allocateCells(). This call also deletes the mesh dimension, which must be reset by setDimension(). It is therefore possible to change the mesh dimension afterward.
This method is collective.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
|
pure virtual |
Indicates the end of cell allocation.
As long as this method has not been called, it is not valid to use this instance, except for allocating the mesh (allocateCells()).
This method is collective.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
|
pure virtual |
Changes the owning subdomains of entities.
This method is called when load balancing and redistributing the mesh between processors is desired. The method assumes that the IItemsFamily::itemsOwner() variables for each type of mesh entity (node, edge, face, and cell) contain the number of the new owning subdomain for each entity. These variables must be synchronized.
The instance then takes care of giving the cells that belong to it to other processors and receiving new cells from them, and then doing the same for nodes, edges, faces, and particles. The values of the variables and entity groups are also exchanged.
After calling this method, you may need to call the mesh change entry points (ITimeLoopMng::execMeshChangedEntryPoints).
To call this method, isDynamic() must be true.
Calling this method triggers an implicit call to endUpdate().
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
Referenced by Arcane::UnstructuredMeshUtilities::partitionAndExchangeMeshWithReplication().
|
inlinevirtual |
Specific initial allocator.
If null, allocateCells() must be used.
Reimplemented in Arcane::mesh::DynamicMesh.
Definition at line 105 of file IPrimaryMesh.h.
Referenced by Arcane::CartesianMeshAllocateBuildInfo::allocateMesh(), and Arcane::UnstructuredMeshAllocateBuildInfo::allocateMesh().
|
pure virtual |
Variable containing the identifier of the owning subdomain.
Returns the variable containing the identifier of the owning subdomain of entities of the given kind.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
|
pure virtual |
Node coordinates.
Implements Arcane::IMesh.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
|
pure virtual |
Reloads the mesh from protected variables.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
Referenced by Arcane::SubDomain::readOrReloadMeshes().
|
pure virtual |
Positions the mesh dimension (1D, 2D, or 3D).
The dimension corresponds to the dimension of the cell elements. If cells of multiple dimensions are present, the highest dimension must be indicated.
The dimension must be set before allocating cells if one uses allocateCells(), and must not be modified afterward.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
Referenced by Arcane::MshMeshReader::_readMeshFromNewMshFile().
|
pure virtual |
Positions partitioning information.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.
|
pure virtual |
Positions entity owners based on the cell owner.
Positions the owners of entities other than cells (Node, Edge, and Face) based on the cell owner. This operation is only useful in parallel and must only be called during initialization after the endAllocate() method.
This operation is collective.
Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMesh.