Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh database and the mesh-modifier event-loop. More...
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 MeshObject registered with typeName. More... | |
template<class... Args> | |
static const Type & | New (const word &objName, const Mesh &mesh, Args &&... args) |
Get existing or create MeshObject with given registration name. More... | |
static bool | Store (std::unique_ptr< Type > &&ptr) |
Transfer ownership of meshObject to registry. More... | |
static bool | Delete (const word &objName, const Mesh &mesh) |
Static destructor using given registration name. More... | |
static bool | Delete (const Mesh &mesh) |
Static destructor using Type::typeName. More... | |
static std::unique_ptr< Type > | Release (const word &objName, const Mesh &mesh, const bool checkout=false) |
Release ownership of meshObject (with given registration name) from registry. Returns nullptr if not found or not owned. More... | |
static std::unique_ptr< Type > | Release (const Mesh &mesh, const bool checkout=false) |
Release ownership of meshObject (with Type::typeName name) from registry. More... | |
Protected Attributes | |
const Mesh & | mesh_ |
Reference to the mesh. More... | |
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 usage,
class leastSquaresVectors : public MeshObject<fvMesh, MoveableMeshObject, leastSquaresVectors> { . . . /*! * \brief Delete the least square vectors when the mesh moves */ virtual bool movePoints(); };
The 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 152 of file MeshObject.H.
|
explicit |
Construct with Type::typeName on Mesh.
Definition at line 29 of file MeshObject.C.
MeshObject | ( | const word & | objName, |
const Mesh & | mesh | ||
) |
Construct with given object name on Mesh.
Definition at line 38 of file MeshObject.C.
|
virtualdefault |
Destructor.
|
static |
Get existing or create MeshObject registered with typeName.
Definition at line 53 of file MeshObject.C.
|
static |
Get existing or create MeshObject with given registration name.
Definition at line 85 of file MeshObject.C.
|
static |
Transfer ownership of meshObject to registry.
Definition at line 196 of file MeshObject.C.
|
static |
Static destructor using given registration name.
Definition at line 120 of file MeshObject.C.
|
inlinestatic |
Static destructor using Type::typeName.
Definition at line 217 of file MeshObject.H.
|
static |
Release ownership of meshObject (with given registration name) from registry. Returns nullptr if not found or not owned.
checkout | optionally perform checkOut() from the registry |
Definition at line 146 of file MeshObject.C.
|
inlinestatic |
Release ownership of meshObject (with Type::typeName name) from registry.
checkout | optionally perform checkOut() from the registry |
Definition at line 240 of file MeshObject.H.
|
inlinenoexcept |
Reference to the mesh.
Definition at line 255 of file MeshObject.H.
Referenced by masterCoarsestGAMGProcAgglomeration::masterCoarsestGAMGProcAgglomeration().
|
inlinevirtual |
Dummy write.
Definition at line 263 of file MeshObject.H.
|
protected |
Reference to the mesh.
Definition at line 161 of file MeshObject.H.