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)
 

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 85 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 242 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 91 of file MeshObject.C.

◆ New() [3/4]

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

Definition at line 129 of file MeshObject.C.

◆ New() [4/4]

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

Definition at line 168 of file MeshObject.C.

◆ Delete()

bool Delete ( const Mesh &  mesh)
static

Definition at line 207 of file MeshObject.C.

◆ mesh()

const Mesh& mesh ( ) const
inline

Definition at line 132 of file MeshObject.H.

◆ writeData()

virtual bool writeData ( Foam::Ostream ) const
inlinevirtual

Reimplemented in fvModels, and fvConstraints.

Definition at line 137 of file MeshObject.H.

Member Data Documentation

◆ mesh_

const Mesh& mesh_
protected

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