Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh database and the mesh-modifier event-loop. More...
#include <MeshObject.H>


Public Member Functions | |
| MeshObject (const Mesh &mesh) | |
| Construct with Type::typeName on Mesh. | |
| MeshObject (const word &objName, const Mesh &mesh) | |
| Construct with given object name on Mesh. | |
| virtual | ~MeshObject ()=default |
| Destructor. | |
| const Mesh & | mesh () const noexcept |
| Reference to the mesh. | |
| virtual bool | writeData (Ostream &os) const |
| Dummy write. | |
Static Public Member Functions | |
| template<class... Args> | |
| static FOAM_NO_DANGLING_REFERENCE const Type & | New (const Mesh &mesh, Args &&... args) |
| Get existing or create MeshObject registered with typeName. | |
| template<class... Args> | |
| static FOAM_NO_DANGLING_REFERENCE const Type & | New (const word &objName, const Mesh &mesh, Args &&... args) |
| Get existing or create MeshObject with given registration name. | |
| static bool | Store (std::unique_ptr< Type > &&ptr) |
| Transfer ownership of meshObject to registry. | |
| static bool | Delete (const word &objName, const Mesh &mesh) |
| Static destructor using given registration name. | |
| static bool | Delete (const Mesh &mesh) |
| Static destructor using Type::typeName. | |
| static std::unique_ptr< Type > | Release (const word &objName, const Mesh &mesh, bool checkout=true) |
| Release ownership of meshObject (with given registration name) from registry. Returns nullptr if not found or not owned. | |
| static std::unique_ptr< Type > | Release (const Mesh &mesh, bool checkout=true) |
| Release ownership of meshObject (with Type::typeName name) from registry. | |
Protected Attributes | |
| const Mesh & | mesh_ |
| Reference to the mesh. | |
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.
| MeshObject | ( | const word & | objName, |
| const Mesh & | mesh ) |
Construct with given object name on Mesh.
|
virtualdefault |
Destructor.
|
static |
Get existing or create MeshObject registered with typeName.
Referenced by geometricElementTransformPointSmoother::calculate(), and geometricElementTransformPointSmoother::cellQuality().

|
static |
Get existing or create MeshObject with given registration name.
|
static |
Transfer ownership of meshObject to registry.
|
static |
Static destructor using given registration name.
Referenced by MeshObject< polyMesh, UpdateableMeshObject, manifoldCellsMeshObject >::Delete().

|
inlinestatic |
Static destructor using Type::typeName.
Definition at line 219 of file MeshObject.H.
|
static |
Release ownership of meshObject (with given registration name) from registry. Returns nullptr if not found or not owned.
| checkout | Perform checkOut() from the registry |
Referenced by MeshObject< polyMesh, UpdateableMeshObject, manifoldCellsMeshObject >::Release().

|
inlinestatic |
Release ownership of meshObject (with Type::typeName name) from registry.
| checkout | Perform checkOut() from the registry |
Definition at line 241 of file MeshObject.H.
|
inlinenoexcept |
Reference to the mesh.
Definition at line 257 of file MeshObject.H.
Referenced by LeastSquaresVectors< Foam::centredCPCCellToCellStencilObject >::LeastSquaresVectors(), masterCoarsestGAMGProcAgglomeration::masterCoarsestGAMGProcAgglomeration(), and lumpedPointDisplacementPointPatchVectorField::setPatchControls().

|
inlinevirtual |
Dummy write.
Definition at line 265 of file MeshObject.H.
|
protected |
Reference to the mesh.
Definition at line 161 of file MeshObject.H.
Referenced by LeastSquaresVectors< Foam::centredCPCCellToCellStencilObject >::stencil().