Arcane  4.1.12.0
Developer documentation
Loading...
Searching...
No Matches
Arcane::IMeshModifier Class Referenceabstract

Mesh modification interface. More...

#include <arcane/core/IMeshModifier.h>

Inheritance diagram for Arcane::IMeshModifier:
Collaboration diagram for Arcane::IMeshModifier:

Public Member Functions

virtual void build ()=0
virtual IMeshmesh ()=0
 Associated mesh.
virtual void setDynamic (bool v)=0
 Sets the property indicating whether the mesh can evolve.
virtual void addCells (Integer nb_cell, Int64ConstArrayView cell_infos, Int32ArrayView cells_lid=Int32ArrayView())=0
 Adds cells.
virtual void addCells (const MeshModifierAddCellsArgs &args)
 Adds cells.
virtual void addFaces (Integer nb_face, Int64ConstArrayView face_infos, Int32ArrayView face_lids=Int32ArrayView())=0
 Adds faces.
virtual void addFaces (const MeshModifierAddFacesArgs &args)
 Adds faces.
virtual void addEdges (Integer nb_edge, Int64ConstArrayView edge_infos, Int32ArrayView edge_lids=Int32ArrayView())=0
 Adds edges.
virtual void addNodes (Int64ConstArrayView nodes_uid, Int32ArrayView nodes_lid=Int32ArrayView())=0
 Adds nodes.
virtual void removeCells (Int32ConstArrayView cells_local_id)=0
 Removes cells.
virtual void removeCells (Int32ConstArrayView cells_local_id, bool update_ghost)=0
virtual void detachCells (Int32ConstArrayView cells_local_id)=0
 Detaches cells from the mesh.
virtual void removeDetachedCells (Int32ConstArrayView cells_local_id)=0
 Removes detached cells.
virtual void flagCellToRefine (Int32ConstArrayView cells_lids)=0
 AMR.
virtual void flagCellToCoarsen (Int32ConstArrayView cells_lids)=0
virtual void refineItems ()=0
virtual void coarsenItems ()=0
virtual void coarsenItemsV2 (bool update_parent_flag)=0
virtual bool adapt ()=0
virtual void registerCallBack (IAMRTransportFunctor *f)=0
virtual void unRegisterCallBack (IAMRTransportFunctor *f)=0
virtual void addHChildrenCells (Cell parent_cell, Integer nb_cell, Int64ConstArrayView cells_infos, Int32ArrayView cells_lid=Int32ArrayView())=0
virtual void addParentCellToCell (Cell child, Cell parent)=0
virtual void addChildCellToCell (Cell parent, Cell child)=0
virtual void addParentFaceToFace (Face child, Face parent)=0
virtual void addChildFaceToFace (Face parent, Face child)=0
virtual void addParentNodeToNode (Node child, Node parent)=0
virtual void addChildNodeToNode (Node parent, Node child)=0
virtual void clearItems ()=0
 Deletes all entities of all families in this mesh.
virtual ARCANE_DEPRECATED_240 void addCells (ISerializer *buffer)=0
 Adds cells from the data contained in buffer.
virtual ARCANE_DEPRECATED_240 void addCells (ISerializer *buffer, Int32Array &cells_local_id)=0
 Adds cells from the data contained in buffer.
virtual void endUpdate ()=0
 Notifies the instance that mesh modification is finished.
virtual void endUpdate (bool update_ghost_layer, bool remove_old_ghost)=0
virtual void updateGhostLayers ()=0
 Updates the ghost layer.
virtual void updateGhostLayerFromParent (Array< Int64 > &ghost_cell_to_refine, Array< Int64 > &ghost_cell_to_coarsen, bool remove_old_ghost)=0
 AMR.
virtual void addExtraGhostCellsBuilder (IExtraGhostCellsBuilder *builder)=0
 addition of the "extraordinary" ghost cells addition algorithm.
virtual void removeExtraGhostCellsBuilder (IExtraGhostCellsBuilder *builder)=0
 Removes the association with the builder instance.
virtual void addExtraGhostParticlesBuilder (IExtraGhostParticlesBuilder *builder)=0
 Addition of the "extraordinary" ghost particle addition algorithm.
virtual void removeExtraGhostParticlesBuilder (IExtraGhostParticlesBuilder *builder)=0
 Removes the association with the builder instance.
virtual void mergeMeshes (ConstArrayView< IMesh * > meshes)=0
 Merges the meshes of meshes with the current mesh.
virtual IMeshModifierInternal_modifierInternalApi ()=0
 Internal API for Arcane.

Detailed Description

Mesh modification interface.

This interface provides the services for modifying a mesh. Mesh manipulation is a complex mechanism and is reserved for experienced users. Some manipulations may leave the mesh in an inconsistent state.

The supported operations depend on the mesh type. For performance reasons, adding and deleting entities do not directly update the entity variables or groups. For this to be taken into account, the endUpdate() method must be called. In parallel, this also triggers the update of ghost entities.

Definition at line 143 of file IMeshModifier.h.

Constructor & Destructor Documentation

◆ ~IMeshModifier()

virtual Arcane::IMeshModifier::~IMeshModifier ( )
inlinevirtual

Definition at line 147 of file IMeshModifier.h.

Member Function Documentation

◆ _modifierInternalApi()

virtual IMeshModifierInternal * Arcane::IMeshModifier::_modifierInternalApi ( )
pure virtual

◆ addCells() [1/4]

void Arcane::IMeshModifier::addCells ( const MeshModifierAddCellsArgs & args)
virtual

Adds cells.

Reimplemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

Definition at line 286 of file InterfaceImpl.cc.

References addCells().

Here is the call graph for this function:

◆ addCells() [2/4]

virtual void Arcane::IMeshModifier::addCells ( Integer nb_cell,
Int64ConstArrayView cell_infos,
Int32ArrayView cells_lid = Int32ArrayView() )
pure virtual

Adds cells.

Adds cells. The format of cells_infos is identical to that of the IMesh::allocateCells() method. If cells_lid is not empty, it will contain the local IDs of the created cells. It is possible to perform multiple successive additions. Once the additions are complete, the endUpdate() method must be called. If an added cell has the same uniqueId() as an existing cell, the existing cell is kept as is and nothing happens.

The created cells are considered to belong to this subdomain. If this is not the case, their ownership must be modified afterwards.

This method is collective. If a subdomain does not wish to add cells, it is possible to pass an empty array.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

References addCells().

Referenced by Arcane::ArcaneBasicMeshSubdividerService::_generateOneHexa(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneQuad(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTetra(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTri(), Arcane::ArcaneBasicMeshSubdividerService::_refineWithArcaneFaces(), addCells(), and addCells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addCells() [3/4]

virtual ARCANE_DEPRECATED_240 void Arcane::IMeshModifier::addCells ( ISerializer * buffer)
pure virtual

Adds cells from the data contained in buffer.

buffer must contain serialized cells, for example by calling IMesh::serializeCells().

Deprecated
Use IMesh::cellFamily()->policyMng()->createSerializer() instead.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ addCells() [4/4]

virtual ARCANE_DEPRECATED_240 void Arcane::IMeshModifier::addCells ( ISerializer * buffer,
Int32Array & cells_local_id )
pure virtual

Adds cells from the data contained in buffer.

buffer must contain serialized cells, for example by calling IMesh::serializeCells(). In return, cells_local_id contains the list of localIds() of the deserialized cells. A cell may appear multiple times in this list if it appears multiple times in buffer.

Deprecated
Use IMesh::cellFamily()->policyMng()->createSerializer() instead.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ addEdges()

virtual void Arcane::IMeshModifier::addEdges ( Integer nb_edge,
Int64ConstArrayView edge_infos,
Int32ArrayView edge_lids = Int32ArrayView() )
pure virtual

Adds edges.

Adds edges. The format of edge_infos is identical to that of the IMesh::allocateCells() method. If edge_lids is not empty, it will contain the local IDs of the created edges. It is possible to perform multiple successive additions. Once the additions are complete, the endUpdate() method must be called. If an added edge has the same uniqueId() as an existing edge, the existing edge is kept as is and nothing happens.

The created edges are considered to belong to this subdomain. If this is not the case, their ownership must be modified afterwards.

This method is collective. If a subdomain does not wish to add edges, it is possible to pass an empty array.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ addExtraGhostCellsBuilder()

virtual void Arcane::IMeshModifier::addExtraGhostCellsBuilder ( IExtraGhostCellsBuilder * builder)
pure virtual

addition of the "extraordinary" ghost cells addition algorithm.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ addExtraGhostParticlesBuilder()

virtual void Arcane::IMeshModifier::addExtraGhostParticlesBuilder ( IExtraGhostParticlesBuilder * builder)
pure virtual

Addition of the "extraordinary" ghost particle addition algorithm.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ addFaces() [1/2]

void Arcane::IMeshModifier::addFaces ( const MeshModifierAddFacesArgs & args)
virtual

Adds faces.

Adds faces. The format of face_infos is identical to that of the IMesh::allocateCells() method. If face_lids is not empty, it will contain the local IDs of the created faces. It is possible to perform multiple successive additions. Once the additions are complete, the endUpdate() method must be called. If an added face has the same uniqueId() as an existing face, the existing face is kept as is and nothing happens.

The created faces are considered to belong to this subdomain. If this is not the case, their ownership must be modified afterwards.

Reimplemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

Definition at line 292 of file InterfaceImpl.cc.

References addFaces().

Here is the call graph for this function:

◆ addFaces() [2/2]

virtual void Arcane::IMeshModifier::addFaces ( Integer nb_face,
Int64ConstArrayView face_infos,
Int32ArrayView face_lids = Int32ArrayView() )
pure virtual

Adds faces.

See also
addFaces(const MeshModifierAddFacesArgs&)

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

References addFaces().

Referenced by addFaces(), and addFaces().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addHChildrenCells()

virtual void Arcane::IMeshModifier::addHChildrenCells ( Cell parent_cell,
Integer nb_cell,
Int64ConstArrayView cells_infos,
Int32ArrayView cells_lid = Int32ArrayView() )
pure virtual

Implemented in Arcane::mesh::DynamicMesh.

◆ addNodes()

virtual void Arcane::IMeshModifier::addNodes ( Int64ConstArrayView nodes_uid,
Int32ArrayView nodes_lid = Int32ArrayView() )
pure virtual

Adds nodes.

Adds nodes with unique identifiers being the values of the nodes_uid array. If nodes_lid is not empty, it will contain the local IDs of the created nodes. It is possible to perform multiple successive additions. Once the additions are complete, the endUpdate() method must be called. It is possible to specify an already existing uniqueId(). In this case, the node is simply ignored.

The created nodes are considered to belong to this subdomain. If this is not the case, their ownership must be modified afterwards.

This method is collective. If a subdomain does not wish to add nodes, it is possible to pass an empty array.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

Referenced by Arcane::ArcaneBasicMeshSubdividerService::_generateOneHexa(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneQuad(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTetra(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTri(), and Arcane::ArcaneBasicMeshSubdividerService::_refineWithArcaneFaces().

Here is the caller graph for this function:

◆ build()

virtual void Arcane::IMeshModifier::build ( )
pure virtual

Implemented in Arcane::mesh::DynamicMesh.

◆ clearItems()

virtual void Arcane::IMeshModifier::clearItems ( )
pure virtual

Deletes all entities of all families in this mesh.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ detachCells()

virtual void Arcane::IMeshModifier::detachCells ( Int32ConstArrayView cells_local_id)
pure virtual

Detaches cells from the mesh.

The detached cells are disconnected from the mesh. The nodes, edges, and faces of these cells no longer reference them, and the uniqueId() of these cells can be reused. To permanently destroy these cells, the removeDetachedCells() method must be called.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ endUpdate()

virtual void Arcane::IMeshModifier::endUpdate ( )
pure virtual

Notifies the instance that mesh modification is finished.

This method is collective.

Implemented in Arcane::mesh::DynamicMesh, Arcane::mesh::EmptyMeshModifier, and Arcane::mesh::PolyhedralMesh.

References endUpdate().

Referenced by Arcane::ArcaneBasicMeshSubdividerService::_generateOneHexa(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneQuad(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTetra(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTri(), Arcane::ArcaneBasicMeshSubdividerService::_refineWithArcaneFaces(), endUpdate(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flagCellToRefine()

virtual void Arcane::IMeshModifier::flagCellToRefine ( Int32ConstArrayView cells_lids)
pure virtual

◆ mergeMeshes()

virtual void Arcane::IMeshModifier::mergeMeshes ( ConstArrayView< IMesh * > meshes)
pure virtual

Merges the meshes of meshes with the current mesh.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ mesh()

virtual IMesh * Arcane::IMeshModifier::mesh ( )
pure virtual

Associated mesh.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ removeCells()

virtual void Arcane::IMeshModifier::removeCells ( Int32ConstArrayView cells_local_id)
pure virtual

Removes cells.

Removes the cells whose local IDs are provided in cells_local_id. It is possible to perform multiple successive removals. Once the removals are complete, the endUpdate() method must be called.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

References removeCells().

Referenced by Arcane::ArcaneBasicMeshSubdividerService::_generateOneHexa(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneQuad(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTetra(), Arcane::ArcaneBasicMeshSubdividerService::_generateOneTri(), Arcane::ArcaneBasicMeshSubdividerService::_refineWithArcaneFaces(), removeCells(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ removeDetachedCells()

virtual void Arcane::IMeshModifier::removeDetachedCells ( Int32ConstArrayView cells_local_id)
pure virtual

Removes detached cells.

Removes detached cells via detachCells(). It is possible to perform multiple successive removals. Once the removals are complete, the endUpdate() method must be called.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ removeExtraGhostCellsBuilder()

virtual void Arcane::IMeshModifier::removeExtraGhostCellsBuilder ( IExtraGhostCellsBuilder * builder)
pure virtual

Removes the association with the builder instance.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ removeExtraGhostParticlesBuilder()

virtual void Arcane::IMeshModifier::removeExtraGhostParticlesBuilder ( IExtraGhostParticlesBuilder * builder)
pure virtual

Removes the association with the builder instance.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

◆ setDynamic()

virtual void Arcane::IMeshModifier::setDynamic ( bool v)
pure virtual

Sets the property indicating whether the mesh can evolve.

This property must be set to true if you wish to modify the mesh, for example by exchanging entities via the exchangeItems() call. This only concerns nodes, edges, faces, and cells, but not particles, which can still be created and destroyed.

By default, isDynamic() is false.

The property setting can only be done during initialization.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

Referenced by Arcane::CartesianMeshCoarsening2::_doDoubleGhostLayers(), Arcane::ArcaneBasicMeshSubdividerService::_refineOnce(), Arcane::CartesianMeshAMRPatchMng::createSubLevel(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().

Here is the caller graph for this function:

◆ updateGhostLayerFromParent()

virtual void Arcane::IMeshModifier::updateGhostLayerFromParent ( Array< Int64 > & ghost_cell_to_refine,
Array< Int64 > & ghost_cell_to_coarsen,
bool remove_old_ghost )
pure virtual

◆ updateGhostLayers()

virtual void Arcane::IMeshModifier::updateGhostLayers ( )
pure virtual

Updates the ghost layer.

This operation is collective.

Implemented in Arcane::mesh::DynamicMesh, and Arcane::mesh::EmptyMeshModifier.

Referenced by Arcane::CartesianMeshCoarsening2::_doDoubleGhostLayers(), Arcane::ArcaneBasicMeshSubdividerService::_refineOnce(), Arcane::CartesianMeshAMRPatchMng::createSubLevel(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: