30 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
33 MeshObjectType<Mesh>(Type::typeName, mesh.thisDb()),
38 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
45 MeshObjectType<Mesh>(Type::typeName, io),
52 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
60 mesh.thisDb().objectRegistry::template foundObject<Type>
66 return mesh.thisDb().objectRegistry::template lookupObjectRef<Type>
73 if (meshObject::debug)
75 Pout<<
"MeshObject::New(" << Mesh::typeName
76 <<
"&) : constructing " << Type::typeName
77 <<
" for region " << mesh.
name() <<
endl;
80 Type* objectPtr =
new Type(mesh);
82 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
89 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
97 mesh.thisDb().objectRegistry::template foundObject<Type>
103 return mesh.thisDb().objectRegistry::template lookupObjectRef<Type>
110 if (meshObject::debug)
112 Pout<<
"MeshObject::New(const " << Mesh::typeName
113 <<
"&) : constructing " << Type::typeName
114 <<
" for region " << mesh.
name() <<
endl;
117 Type* objectPtr =
new Type(mesh);
119 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
126 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
127 template<
class... Args>
136 mesh.thisDb().objectRegistry::template foundObject<Type>
142 return mesh.thisDb().objectRegistry::template lookupObject<Type>
149 if (meshObject::debug)
151 Pout<<
"MeshObject::New(" << Mesh::typeName
152 <<
"&, const Data1&) : constructing " << Type::typeName
153 <<
" for region " << mesh.
name() <<
endl;
156 Type* objectPtr =
new Type(mesh, args...);
158 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
165 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
166 template<
class... Args>
175 mesh.thisDb().objectRegistry::template foundObject<Type>
181 return mesh.thisDb().objectRegistry::template lookupObject<Type>
188 if (meshObject::debug)
190 Pout<<
"MeshObject::New(const " << Mesh::typeName
191 <<
"&, const Data1&) : constructing " << Type::typeName
192 <<
" for region " << mesh.
name() <<
endl;
195 Type* objectPtr =
new Type(mesh, args...);
197 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
206 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
211 mesh.thisDb().objectRegistry::template foundObject<Type>
217 if (meshObject::debug)
219 Pout<<
"MeshObject::Delete(const Mesh&) : deleting " 220 << Type::typeName <<
endl;
223 return mesh.thisDb().checkOut
227 mesh.thisDb().objectRegistry::template lookupObject<Type>
241 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
244 MeshObjectType<Mesh>::release();
256 if (meshObject::debug)
258 Pout<<
"meshObject::movePoints(objectRegistry&) :" 259 <<
" moving " << Mesh::typeName
260 <<
" meshObjects for region " << obr.
name() <<
endl;
272 if (meshObject::debug)
280 if (meshObject::debug)
298 if (meshObject::debug)
300 Pout<<
"meshObject::updateMesh(objectRegistry&, " 301 "const mapPolyMesh& mpm) : updating " << Mesh::typeName
302 <<
" meshObjects for region " << obr.
name() <<
endl;
314 if (meshObject::debug)
322 if (meshObject::debug)
340 if (meshObject::debug)
342 Pout<<
"meshObject::addPatch(objectRegistry&, " 343 "const label patchi) : updating " << Mesh::typeName
344 <<
" meshObjects for region " << obr.
name() <<
endl;
356 if (meshObject::debug)
364 if (meshObject::debug)
379 const bool validBoundary
387 if (meshObject::debug)
389 Pout<<
"meshObject::addPatch(objectRegistry&, " 390 "const labelUList&, const bool) : updating " << Mesh::typeName
391 <<
" meshObjects for region " << obr.
name() <<
endl;
403 if (meshObject::debug)
415 if (meshObject::debug)
425 template<
class Mesh,
template<
class>
class MeshObjectType>
433 if (meshObject::debug)
435 Pout<<
"meshObject::clear(objectRegistry&) :" 436 <<
" clearing " << Mesh::typeName
437 <<
" meshObjects for region " << obr.
name() <<
endl;
442 if (meshObject::debug)
454 template<
class>
class FromType,
455 template<
class>
class ToType
464 if (meshObject::debug)
466 Pout<<
"meshObject::clearUpto(objectRegistry&) :" 467 <<
" clearing " << Mesh::typeName
468 <<
" meshObjects for region " << obr.
name() <<
endl;
473 if (!
isA<ToType<Mesh>>(*iter()))
475 if (meshObject::debug)
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
virtual const fileName & name() const
Return the name of the stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
static bool Delete(const Mesh &mesh)
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool checkOut(regIOobject &) const
Remove an regIOobject from registry.
static void movePoints(objectRegistry &)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
static void clearUpto(objectRegistry &)
Clear all meshObject derived from FromType up to (but not including)
static void updateMesh(objectRegistry &, const mapPolyMesh &)
An STL-conforming hash table.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static void addPatch(objectRegistry &, const label patchi)
static Type & New(Mesh &mesh)
static void reorderPatches(objectRegistry &, const labelUList &newToOld, const bool validBoundary)
prefixOSstream Pout(cout, "Pout")
Registry of regIOobjects.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
MeshObject(const Mesh &mesh)
static void clear(objectRegistry &)
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.