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 >:
Collaboration diagram for MeshObject< Mesh, MeshObjectType, Type >:

Public Member Functions

 MeshObject (const Mesh &mesh)
 
 MeshObject (const Mesh &mesh, const IOobject &io)
 
virtual ~MeshObject ()
 
const Mesh & mesh () const
 
virtual bool writeData (Foam::Ostream &) const
 

Static Public Member Functions

static Type & New (Mesh &mesh)
 
static const Type & New (const Mesh &mesh)
 
template<class... Args>
static Type & New (Mesh &mesh, const Args &... args)
 
template<class... Args>
static const Type & New (const Mesh &mesh, const Args &... args)
 
static bool Delete (const Mesh &mesh)
 
static bool found (const Mesh &mesh)
 Return true if this MeshObject is found in the mesh registry. 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, DistributeableMeshObject, 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 topoChange functions must exist, provided for MeshObjects of type UpdateableMeshObject.

Source files

Definition at line 87 of file MeshObject.H.

Constructor & Destructor Documentation

◆ MeshObject() [1/2]

MeshObject ( const Mesh &  mesh)
explicit

Definition at line 31 of file MeshObject.C.

Referenced by MeshObject< fvMesh, MoveableMeshObject, CentredFitSnGradData< Polynomial > >::MeshObject().

Here is the caller graph for this function:

◆ MeshObject() [2/2]

MeshObject ( const Mesh &  mesh,
const IOobject io 
)

Definition at line 40 of file MeshObject.C.

◆ ~MeshObject()

~MeshObject ( )
virtual

Definition at line 212 of file MeshObject.C.

Member Function Documentation

◆ New() [1/4]

Type & New ( Mesh &  mesh)
static

◆ New() [2/4]

const Type & New ( const Mesh &  mesh)
static

Definition at line 85 of file MeshObject.C.

◆ New() [3/4]

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

Definition at line 117 of file MeshObject.C.

◆ New() [4/4]

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

Definition at line 150 of file MeshObject.C.

◆ Delete()

bool Delete ( const Mesh &  mesh)
static

Definition at line 183 of file MeshObject.C.

◆ found()

bool found ( const Mesh &  mesh)
static

Return true if this MeshObject is found in the mesh registry.

Definition at line 222 of file MeshObject.C.

Referenced by MeshObject< fvMesh, MoveableMeshObject, CentredFitSnGradData< Polynomial > >::~MeshObject().

Here is the caller graph for this function:

◆ mesh()

const Mesh& mesh ( ) const
inline

Definition at line 137 of file MeshObject.H.

◆ writeData()

virtual bool writeData ( Foam::Ostream ) const
inlinevirtual

Reimplemented in fvModels, fvConstraints, and coordinateSystems.

Definition at line 142 of file MeshObject.H.

Member Data Documentation

◆ mesh_

const Mesh& mesh_
protected

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