32 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
35 MeshObjectType<Mesh>(Type::typeName, mesh.thisDb()),
42 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
50 mesh.thisDb().objectRegistry::template foundObject<Type>
56 return mesh.thisDb().objectRegistry::template lookupObject<Type>
63 if (meshObject::debug)
65 Pout<<
"MeshObject::New(const " << Mesh::typeName
66 <<
"&) : constructing " << Type::typeName
67 <<
" for region " << mesh.
name() <<
endl;
70 Type* objectPtr =
new Type(mesh);
72 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
79 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
89 mesh.thisDb().objectRegistry::template foundObject<Type>
95 return mesh.thisDb().objectRegistry::template lookupObject<Type>
102 if (meshObject::debug)
104 Pout<<
"MeshObject::New(const " << Mesh::typeName
105 <<
"&, const Data1&) : constructing " << Type::typeName
106 <<
" for region " << mesh.
name() <<
endl;
109 Type* objectPtr =
new Type(mesh, d);
111 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
118 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
119 template<
class Data1,
class Data2>
129 mesh.thisDb().objectRegistry::template foundObject<Type>
135 return mesh.thisDb().objectRegistry::template lookupObject<Type>
142 if (meshObject::debug)
144 Pout<<
"MeshObject::New(const " << Mesh::typeName
145 <<
"&, const Data[1-2]&) : constructing " << Type::typeName
146 <<
" for region " << mesh.
name() <<
endl;
149 Type* objectPtr =
new Type(mesh, d1, d2);
153 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
160 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
161 template<
class Data1,
class Data2,
class Data3>
172 mesh.thisDb().objectRegistry::template foundObject<Type>
178 return mesh.thisDb().objectRegistry::template lookupObject<Type>
185 if (meshObject::debug)
187 Pout<<
"MeshObject::New(const " << Mesh::typeName
188 <<
"&, const Data[1-3]&) : constructing " << Type::typeName
189 <<
" for region " << mesh.
name() <<
endl;
191 Type* objectPtr =
new Type(mesh, d1, d2, d3);
193 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
200 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
201 template<
class Data1,
class Data2,
class Data3,
class Data4>
213 mesh.thisDb().objectRegistry::template foundObject<Type>
219 return mesh.thisDb().objectRegistry::template lookupObject<Type>
226 if (meshObject::debug)
228 Pout<<
"MeshObject::New(const " << Mesh::typeName
229 <<
"&, const Data[1-4]&) : constructing " << Type::typeName
230 <<
" for region " << mesh.
name() <<
endl;
232 Type* objectPtr =
new Type(mesh, d1, d2, d3, d4);
234 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
243 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
248 mesh.thisDb().objectRegistry::template foundObject<Type>
254 if (meshObject::debug)
256 Pout<<
"MeshObject::Delete(const Mesh&) : deleting " 257 << Type::typeName <<
endl;
260 return mesh.thisDb().checkOut
264 mesh.thisDb().objectRegistry::template lookupObject<Type>
278 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
281 MeshObjectType<Mesh>::release();
293 if (meshObject::debug)
295 Pout<<
"meshObject::movePoints(objectRegistry&) :" 296 <<
" moving " << Mesh::typeName
297 <<
" meshObjects for region " << obr.
name() <<
endl;
309 if (meshObject::debug)
317 if (meshObject::debug)
335 if (meshObject::debug)
337 Pout<<
"meshObject::updateMesh(objectRegistry&, " 338 "const mapPolyMesh& mpm) : updating " << Mesh::typeName
339 <<
" meshObjects for region " << obr.
name() <<
endl;
351 if (meshObject::debug)
359 if (meshObject::debug)
369 template<
class Mesh,
template<
class>
class MeshObjectType>
377 if (meshObject::debug)
379 Pout<<
"meshObject::clear(objectRegistry&) :" 380 <<
" clearing " << Mesh::typeName
381 <<
" meshObjects for region " << obr.
name() <<
endl;
386 if (meshObject::debug)
398 template<
class>
class FromType,
399 template<
class>
class ToType
408 if (meshObject::debug)
410 Pout<<
"meshObject::clearUpto(objectRegistry&) :" 411 <<
" clearing " << Mesh::typeName
412 <<
" meshObjects for region " << obr.
name() <<
endl;
417 if (!
isA<ToType<Mesh>>(*iter()))
419 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.
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 const Type & New(const Mesh &mesh)
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
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.
prefixOSstream Pout(cout, "Pout")
Registry of regIOobjects.
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.