31 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
42 mesh.thisDb().instance(),
46 MeshObjectType<Mesh>(*this, mesh),
51 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
59 MeshObjectType<Mesh>(*this, mesh),
66 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
74 return mesh.thisDb().objectRegistry::template lookupObjectRef<Type>
81 if (meshObjects::debug)
83 Pout<<
"DemandDrivenMeshObject::New(" << Mesh::typeName
84 <<
"&) : constructing " << Type::typeName
85 <<
" for region " << mesh.
name() <<
endl;
88 Type* objectPtr =
new Type(mesh);
95 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
96 template<
class... Args>
105 return mesh.thisDb().objectRegistry::template lookupObjectRef<Type>
112 if (meshObjects::debug)
114 Pout<<
"DemandDrivenMeshObject::New(" << Mesh::typeName
115 <<
"&, const Data1&) : constructing " << Type::typeName
116 <<
" for region " << mesh.
name() <<
endl;
119 Type* objectPtr =
new Type(mesh,
args...);
128 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
136 if (meshObjects::debug)
138 Pout<<
"DemandDrivenMeshObject::Delete(const Mesh&) : deleting "
142 return mesh.thisDb().checkOut
146 mesh.thisDb().objectRegistry::template lookupObject<Type>
160 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
170 template<
class Mesh,
template<
class>
class MeshObjectType,
class Type>
176 return mesh.thisDb().objectRegistry::template foundObject<Type>
static bool Delete(const Mesh &mesh)
Lookup DemandDrivenMeshObject and delete.
virtual ~DemandDrivenMeshObject()
static Type & New(const Mesh &mesh)
DemandDrivenMeshObject(const Mesh &mesh)
Construct from mesh.
static bool found(const Mesh &mesh)
Return true if this DemandDrivenMeshObject is found.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual const fileName & name() const
Return the name of the stream.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
void release()
Release ownership of this object from its registry.
void store()
Transfer ownership of this object to its registry.
Ostream & endl(Ostream &os)
Add newline and flush stream.
prefixOSstream Pout(cout, "Pout")
Foam::argList args(argc, argv)