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 return mesh.thisDb().objectRegistry::template lookupObjectRef<Type>
67 if (meshObject::debug)
69 Pout<<
"MeshObject::New(" << Mesh::typeName
70 <<
"&) : constructing " << Type::typeName
71 <<
" for region " << mesh.
name() <<
endl;
74 Type* objectPtr =
new Type(mesh);
76 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
83 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
91 return mesh.thisDb().objectRegistry::template lookupObjectRef<Type>
98 if (meshObject::debug)
100 Pout<<
"MeshObject::New(const " << Mesh::typeName
101 <<
"&) : constructing " << Type::typeName
102 <<
" for region " << mesh.
name() <<
endl;
105 Type* objectPtr =
new Type(mesh);
107 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
114 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
115 template<
class... Args>
124 return mesh.thisDb().objectRegistry::template lookupObject<Type>
131 if (meshObject::debug)
133 Pout<<
"MeshObject::New(" << Mesh::typeName
134 <<
"&, const Data1&) : constructing " << Type::typeName
135 <<
" for region " << mesh.
name() <<
endl;
138 Type* objectPtr =
new Type(mesh, args...);
140 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
147 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
148 template<
class... Args>
157 return mesh.thisDb().objectRegistry::template lookupObject<Type>
164 if (meshObject::debug)
166 Pout<<
"MeshObject::New(const " << Mesh::typeName
167 <<
"&, const Data1&) : constructing " << Type::typeName
168 <<
" for region " << mesh.
name() <<
endl;
171 Type* objectPtr =
new Type(mesh, args...);
173 regIOobject::store(
static_cast<MeshObjectType<Mesh>*
>(objectPtr));
182 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
187 if (meshObject::debug)
189 Pout<<
"MeshObject::Delete(const Mesh&) : deleting " 190 << Type::typeName <<
endl;
193 return mesh.thisDb().checkOut
197 mesh.thisDb().objectRegistry::template lookupObject<Type>
211 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
214 MeshObjectType<Mesh>::release();
220 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
226 return mesh.thisDb().objectRegistry::template foundObject<Type>
241 if (meshObject::debug)
243 Pout<<
"meshObject::movePoints(objectRegistry&) :" 244 <<
" moving " << Mesh::typeName
245 <<
" meshObjects for region " << obr.
name() <<
endl;
257 if (meshObject::debug)
265 if (meshObject::debug)
287 if (meshObject::debug)
289 Pout<<
"meshObject::distribute(objectRegistry&, " 290 "const polyDistributionMap& map) : updating " 292 <<
" meshObjects for region " << obr.
name() <<
endl;
304 if (meshObject::debug)
313 if (meshObject::debug)
335 if (meshObject::debug)
337 Pout<<
"meshObject::topoChange(objectRegistry&, " 338 "const polyTopoChangeMap& map) : updating " << Mesh::typeName
339 <<
" meshObjects for region " << obr.
name() <<
endl;
351 if (meshObject::debug)
359 if (meshObject::debug)
381 if (meshObject::debug)
383 Pout<<
"meshObject::mapMesh(objectRegistry&, " 384 "const polyMeshMap& map) : updating " << Mesh::typeName
385 <<
" meshObjects for region " << obr.
name() <<
endl;
397 if (meshObject::debug)
405 if (meshObject::debug)
423 if (meshObject::debug)
425 Pout<<
"meshObject::addPatch(objectRegistry&, " 426 "const label patchi) : updating " << Mesh::typeName
427 <<
" meshObjects for region " << obr.
name() <<
endl;
439 if (meshObject::debug)
447 if (meshObject::debug)
462 const bool validBoundary
470 if (meshObject::debug)
472 Pout<<
"meshObject::addPatch(objectRegistry&, " 473 "const labelUList&, const bool) : updating " << Mesh::typeName
474 <<
" meshObjects for region " << obr.
name() <<
endl;
486 if (meshObject::debug)
498 if (meshObject::debug)
508 template<
class Mesh,
template<
class>
class MeshObjectType>
516 if (meshObject::debug)
518 Pout<<
"meshObject::clear(objectRegistry&) :" 519 <<
" clearing " << Mesh::typeName
520 <<
" meshObjects for region " << obr.
name() <<
endl;
525 if (meshObject::debug)
537 template<
class>
class FromType,
538 template<
class>
class ToType
547 if (meshObject::debug)
549 Pout<<
"meshObject::clearUpto(objectRegistry&) :" 550 <<
" clearing " << Mesh::typeName
551 <<
" meshObjects for region " << obr.
name() <<
endl;
556 if (!
isA<ToType<Mesh>>(*iter()))
558 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.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
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 &)
static bool found(const Mesh &mesh)
Return true if this MeshObject is found in the mesh registry.
static void mapMesh(objectRegistry &, const polyMeshMap &)
static void distribute(objectRegistry &, const polyDistributionMap &)
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void mapMesh(const meshToMesh &interp, const HashSet< word > &selectedFields, const bool noLagrangian)
static void clearUpto(objectRegistry &)
Clear all meshObject derived from FromType up to (but not including)
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")
static void topoChange(objectRegistry &, const polyTopoChangeMap &)
Registry of regIOobjects.
Class containing mesh-to-mesh mapping information.
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.