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)
 Construct with Type::typeName on Mesh. More...
 
 MeshObject (const word &objName, const Mesh &mesh)
 Construct with given object name on Mesh. More...
 
virtual ~MeshObject ()=default
 Destructor. More...
 
const Mesh & mesh () const noexcept
 Reference to the mesh. More...
 
virtual bool writeData (Ostream &os) const
 Dummy write. More...
 

Static Public Member Functions

template<class... Args>
static const Type & New (const Mesh &mesh, Args &&... args)
 Get existing or create a new MeshObject. Registered with typeName. More...
 
template<class... Args>
static const Type & New (const word &objName, const Mesh &mesh, Args &&... args)
 Get existing or create a new MeshObject using supplied registration name. More...
 
static bool Delete (const word &objName, const Mesh &mesh)
 Static destructor using supplied registration name. More...
 
static bool Delete (const Mesh &mesh)
 Static destructor using Type::typeName. More...
 

Protected Attributes

const Mesh & mesh_
 Reference to the mesh. More...
 

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>
{
.
.
.
    /*!
     * \brief 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.

SourceFiles meshObject.C MeshObject.C

\*—————————————————————————

Definition at line 85 of file MeshObject.H.

Constructor & Destructor Documentation

◆ MeshObject() [1/2]

MeshObject ( const Mesh &  mesh)
explicit

Construct with Type::typeName on Mesh.

Definition at line 29 of file MeshObject.C.

◆ MeshObject() [2/2]

MeshObject ( const word objName,
const Mesh &  mesh 
)

Construct with given object name on Mesh.

Definition at line 38 of file MeshObject.C.

◆ ~MeshObject()

virtual ~MeshObject ( )
virtualdefault

Destructor.

Member Function Documentation

◆ New() [1/2]

◆ New() [2/2]

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

Get existing or create a new MeshObject using supplied registration name.

Definition at line 85 of file MeshObject.C.

◆ Delete() [1/2]

bool Delete ( const word objName,
const Mesh &  mesh 
)
static

Static destructor using supplied registration name.

Definition at line 121 of file MeshObject.C.

◆ Delete() [2/2]

static bool Delete ( const Mesh &  mesh)
inlinestatic

Static destructor using Type::typeName.

Definition at line 146 of file MeshObject.H.

◆ mesh()

const Mesh& mesh ( ) const
inlinenoexcept

Reference to the mesh.

Definition at line 157 of file MeshObject.H.

Referenced by masterCoarsestGAMGProcAgglomeration::masterCoarsestGAMGProcAgglomeration(), and faMesh::mesh().

Here is the caller graph for this function:

◆ writeData()

virtual bool writeData ( Ostream os) const
inlinevirtual

Dummy write.

Definition at line 165 of file MeshObject.H.

Member Data Documentation

◆ mesh_

const Mesh& mesh_
protected

Reference to the mesh.

Definition at line 94 of file MeshObject.H.


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