MeshObject< Mesh, MeshObjectType, Type > Class Template Reference

Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh database and the mesh-modifier event-loop. More...

Inheritance diagram for MeshObject< Mesh, MeshObjectType, Type >:
[legend]
Collaboration diagram for MeshObject< Mesh, MeshObjectType, Type >:
[legend]

Public Member Functions

 MeshObject (const Mesh &mesh)
 Construct on Mesh type. More...
 
virtual ~MeshObject ()=default
 Destructor. More...
 
const Mesh & mesh () const
 
virtual bool writeData (Ostream &os) const
 

Static Public Member Functions

template<class... Args>
static const Type & New (const Mesh &mesh, Args &&... args)
 Get existing or create a new MeshObject. More...
 
static bool Delete (const Mesh &mesh)
 Static destructor. More...
 

Protected Attributes

const Mesh & mesh_
 

Detailed Description

template<class Mesh, template< class > class MeshObjectType, class Type>
class Foam::MeshObject< Mesh, MeshObjectType, Type >

Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh database and the mesh-modifier event-loop.

MeshObject is templated on the type of mesh it is allocated to, the type of the mesh object (TopologicalMeshObject, GeometricMeshObject, MoveableMeshObject, UpdateableMeshObject) and the type of the actual object it is created for example:

class leastSquaresVectors
:
    public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors>
{
.
.
.
    //! Delete the least square vectors when the mesh moves
    virtual bool movePoints();
};

MeshObject types:

Note
movePoints must be provided for MeshObjects of type MoveableMeshObject and both movePoints and updateMesh functions must exist, provided for MeshObjects of type UpdateableMeshObject.
Source files

Definition at line 88 of file MeshObject.H.

Constructor & Destructor Documentation

◆ MeshObject()

MeshObject ( const Mesh &  mesh)
explicit

Construct on Mesh type.

Definition at line 36 of file MeshObject.C.

◆ ~MeshObject()

virtual ~MeshObject ( )
virtualdefault

Destructor.

Member Function Documentation

◆ New()

const Type & New ( const Mesh &  mesh,
Args &&...  args 
)
static

Get existing or create a new MeshObject.

Definition at line 47 of file MeshObject.C.

References args, Foam::endl(), mesh, fvMesh::name(), Foam::Pout, regIOobject::store(), and fvMesh::thisDb().

Here is the call graph for this function:

◆ Delete()

bool Delete ( const Mesh &  mesh)
static

Static destructor.

Definition at line 82 of file MeshObject.C.

References objectRegistry::checkOut(), Foam::endl(), mesh, Foam::Pout, and fvMesh::thisDb().

Here is the call graph for this function:

◆ mesh()

const Mesh & mesh ( ) const
inline

Definition at line 122 of file MeshObject.H.

References MeshObject< Mesh, MeshObjectType, Type >::mesh_.

Referenced by faMesh::mesh().

Here is the caller graph for this function:

◆ writeData()

virtual bool writeData ( Ostream os) const
inlinevirtual

Definition at line 127 of file MeshObject.H.

Member Data Documentation

◆ mesh_

const Mesh& mesh_
protected

Definition at line 96 of file MeshObject.H.

Referenced by MeshObject< Mesh, MeshObjectType, Type >::mesh().


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