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

Mesh modification interface. More...

#include <arcane/core/IMeshModifier.h>

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

◆ addCells() [1/4]

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

Adds cells.

Definition at line 286 of file InterfaceImpl.cc.

References addCells().

◆ 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.

References addCells().

Referenced by addCells(), and addCells().

◆ 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.

◆ 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.

◆ 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.

◆ 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.

Definition at line 292 of file InterfaceImpl.cc.

References addFaces().

◆ 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&)

References addFaces().

Referenced by addFaces(), and addFaces().

◆ 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.

◆ 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.

◆ endUpdate()

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

Notifies the instance that mesh modification is finished.

This method is collective.

References endUpdate().

Referenced by endUpdate(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().

◆ 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.

References removeCells().

Referenced by removeCells(), and Arcane::CartesianMeshCoarsening::removeRefinedCells().

◆ 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.

◆ 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.

Referenced by Arcane::CartesianMeshCoarsening::removeRefinedCells().

◆ updateGhostLayers()

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

Updates the ghost layer.

This operation is collective.

Referenced by Arcane::CartesianMeshCoarsening::removeRefinedCells().


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