Go to the documentation of this file.
35 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
38 MeshObjectType<Mesh>(Type::typeName,
mesh.thisDb()),
45 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
46 template<
class... Args>
54 mesh.thisDb().objectRegistry::template cfindObject<Type>
66 Pout<<
"MeshObject::New(const " << Mesh::typeName
67 <<
"&, ...) : constructing " << Type::typeName
68 <<
" for region " <<
mesh.name() <<
endl;
71 Type* objectPtr =
new Type(
mesh, std::forward<Args>(
args)...);
73 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
81 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
85 mesh.thisDb().objectRegistry::template getObjectPtr<Type>
94 Pout<<
"MeshObject::Delete(const Mesh&) : deleting "
95 << Type::typeName <<
endl;
98 return mesh.thisDb().checkOut(ptr);
115 Pout<<
"meshObject::movePoints(objectRegistry&) :"
116 <<
" moving " << Mesh::typeName
117 <<
" meshObjects for region " << obr.
name() <<
endl;
131 objectPtr->movePoints();
155 Pout<<
"meshObject::updateMesh(objectRegistry&, "
156 "const mapPolyMesh& mpm) : updating " << Mesh::typeName
157 <<
" meshObjects for region " << obr.
name() <<
endl;
171 objectPtr->updateMesh(mpm);
185 template<
class Mesh,
template<
class>
class MeshObjectType>
195 Pout<<
"meshObject::clear(objectRegistry&) :"
196 <<
" clearing " << Mesh::typeName
197 <<
" meshObjects for region " << obr.
name() <<
endl;
214 template<
class>
class FromType,
215 template<
class>
class ToType
226 Pout<<
"meshObject::clearUpto(objectRegistry&) :"
227 <<
" clearing " << Mesh::typeName
228 <<
" meshObjects for region " << obr.
name() <<
endl;
234 auto* objectPtr =
dynamic_cast<ToType<Mesh>*
>(*iter);
int debug
Static debugging option.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
const word & name() const
Return name.
static void updateMesh(objectRegistry &obr, const mapPolyMesh &mpm)
static void clear(objectRegistry &obr)
MeshObject(const Mesh &mesh)
Construct on Mesh type.
static const Type & New(const Mesh &mesh, Args &&... args)
Get existing or create a new MeshObject.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
Registry of regIOobjects.
HashTable< const Type * > lookupClass(const bool strict=false) const
Return all objects with a class satisfying isA<Type>
virtual const fileName & name() const
Return the name of the stream.
#define forAllIters(container, iter)
Iterate across all elements in the container object.
static void movePoints(objectRegistry &obr)
A HashTable similar to std::unordered_map.
static bool Delete(const Mesh &mesh)
Static destructor.
static void clearUpto(objectRegistry &obr)
bool checkOut(regIOobject *io) const
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Foam::argList args(argc, argv)