74#ifndef Foam_MeshObject_H
75#define Foam_MeshObject_H
121 template<
class Mesh,
template<
class>
class MeshObjectType>
130 template<
class>
class FromType,
131 template<
class>
class ToType
141template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
144 public MeshObjectType<Mesh>
170 template<
class... Args>
172 static const Type&
New(
const Mesh&
mesh, Args&&...
args);
175 template<
class... Args>
177 static const Type&
New
185 static bool Store(std::unique_ptr<Type>&& ptr);
198 static std::unique_ptr<Type>
Release
325 #include "MeshObject.txx"
GeometricMeshObject(const word &objName, const objectRegistry &obr)
Construct from name and instance on registry.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
MeshObject(const Mesh &mesh)
Construct with Type::typeName on Mesh.
virtual ~MeshObject()=default
Destructor.
static bool Store(std::unique_ptr< Type > &&ptr)
Transfer ownership of meshObject to registry.
static FOAM_NO_DANGLING_REFERENCE const Type & New(const Mesh &mesh, Args &&... args)
Get existing or create MeshObject registered with typeName.
const polyMesh & mesh() const noexcept
static bool Delete(const word &objName, const Mesh &mesh)
Static destructor using given registration name.
virtual bool writeData(Ostream &os) const
Dummy write.
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 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 ...
static std::unique_ptr< Type > Release(const Mesh &mesh, bool checkout=true)
Release ownership of meshObject (with Type::typeName name) from registry.
MeshObject(const word &objName, const Mesh &mesh)
Construct with given object name on Mesh.
virtual bool movePoints()=0
Update for mesh motion.
MoveableMeshObject(const word &objName, const objectRegistry &obr)
Construct from name and instance on registry.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
TopologicalMeshObject(const word &objName, const objectRegistry &obr)
Construct from name and instance on registry.
virtual void updateMesh(const mapPolyMesh &mpm)=0
Update topology using the given map.
UpdateableMeshObject(const word &objName, const objectRegistry &obr)
Construct from name and instance on registry.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
The meshObject is a concrete regIOobject to register MeshObject items.
static void clearUpto(objectRegistry &obr)
Clear all meshObject derived from FromType up to (but not including) ToType.
static void clear(objectRegistry &obr)
Clear/remove all meshObject of MeshObjectType via objectRegistry::checkOut().
meshObject(const word &objName, const objectRegistry &obr)
Construct with given object name on a registry.
static void updateMesh(objectRegistry &obr, const mapPolyMesh &mpm)
Update topology using the given map.
ClassName("meshObject")
Runtime declaration and debug switch.
static void movePoints(objectRegistry &obr)
Update for mesh motion.
Registry of regIOobjects.
regIOobject(const IOobject &io, const bool isTimeObject=false)
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIO...
A class for handling words, derived from Foam::string.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
OBJstream os(runTime.globalPath()/outputName)
Foam::argList args(argc, argv)
#define FOAM_NO_DANGLING_REFERENCE