35template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
38 MeshObjectType<Mesh>(Type::typeName,
mesh.thisDb()),
45template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
46template<
class... Args>
54 mesh.
thisDb().objectRegistry::template cfindObject<Type>
64 if (meshObject::debug)
66 Pout<<
"MeshObject::New(const " << Mesh::typeName
67 <<
"&, ...) : constructing " << Type::typeName
71 Type* objectPtr =
new Type(
mesh, std::forward<Args>(
args)...);
81template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
85 mesh.
thisDb().objectRegistry::template getObjectPtr<Type>
92 if (meshObject::debug)
94 Pout<<
"MeshObject::Delete(const Mesh&) : deleting "
95 << Type::typeName <<
endl;
113 if (meshObject::debug)
115 Pout<<
"meshObject::movePoints(objectRegistry&) :"
116 <<
" moving " << Mesh::typeName
117 <<
" meshObjects for region " << obr.
name() <<
endl;
127 if (meshObject::debug)
131 objectPtr->movePoints();
135 if (meshObject::debug)
153 if (meshObject::debug)
155 Pout<<
"meshObject::updateMesh(objectRegistry&, "
156 "const mapPolyMesh& mpm) : updating " << Mesh::typeName
157 <<
" meshObjects for region " << obr.
name() <<
endl;
167 if (meshObject::debug)
171 objectPtr->updateMesh(mpm);
175 if (meshObject::debug)
185template<
class Mesh,
template<
class>
class MeshObjectType>
193 if (meshObject::debug)
195 Pout<<
"meshObject::clear(objectRegistry&) :"
196 <<
" clearing " << Mesh::typeName
197 <<
" meshObjects for region " << obr.
name() <<
endl;
202 if (meshObject::debug)
214 template<
class>
class FromType,
215 template<
class>
class ToType
224 if (meshObject::debug)
226 Pout<<
"meshObject::clearUpto(objectRegistry&) :"
227 <<
" clearing " << Mesh::typeName
228 <<
" meshObjects for region " << obr.
name() <<
endl;
234 auto* objectPtr =
dynamic_cast<ToType<Mesh>*
>(*iter);
238 if (meshObject::debug)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
A HashTable similar to std::unordered_map.
const word & name() const noexcept
Return the object name.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
static bool Delete(const Mesh &mesh)
Static destructor.
virtual const fileName & name() const
Get the name of the stream.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
const word & name() const
Return reference to name.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
static void clearUpto(objectRegistry &obr)
void movePoints()
Update for new mesh geometry.
void updateMesh()
Update for new mesh topology.
Registry of regIOobjects.
HashTable< const Type * > lookupClass(const bool strict=false) const
Return all objects with a class satisfying isA<Type>
bool checkOut(regIOobject *io) const
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
Foam::argList args(argc, argv)
#define forAllIters(container, iter)
Iterate across all elements in the container object.