32 void Foam::meshObjects::Delete(regIOobject& io)
34 if (meshObjects::debug)
39 if (io.ownedByRegistry())
46 <<
"Attempt to checkout and delete object " << io.name()
47 <<
" not owned by registry."
63 if (meshObjects::debug)
65 Pout<<
"meshObjects::movePoints(objectRegistry&) :"
66 <<
" moving " << Mesh::typeName
67 <<
" meshObjects for region " << obr.
name() <<
endl;
79 if (meshObjects::debug)
87 Delete<Mesh>(iter()->io_);
105 if (meshObjects::debug)
107 Pout<<
"meshObjects::distribute(objectRegistry&, "
108 "const polyDistributionMap& map) : updating "
110 <<
" meshObjects for region " << obr.
name() <<
endl;
122 if (meshObjects::debug)
131 Delete<Mesh>(iter()->io_);
149 if (meshObjects::debug)
151 Pout<<
"meshObjects::topoChange(objectRegistry&, "
152 "const polyTopoChangeMap& map) : updating " << Mesh::typeName
153 <<
" meshObjects for region " << obr.
name() <<
endl;
165 if (meshObjects::debug)
173 Delete<Mesh>(iter()->io_);
191 if (meshObjects::debug)
193 Pout<<
"meshObjects::mapMesh(objectRegistry&, "
194 "const polyMeshMap& map) : updating " << Mesh::typeName
195 <<
" meshObjects for region " << obr.
name() <<
endl;
207 if (meshObjects::debug)
215 Delete<Mesh>(iter()->io_);
229 if (meshObjects::debug)
231 Pout<<
"meshObjects::addPatch(objectRegistry&, "
232 "const label patchi) : updating " << Mesh::typeName
233 <<
" meshObjects for region " << obr.
name() <<
endl;
245 if (meshObjects::debug)
247 Pout<<
" Adding patch to " << iter()->io_.
name() <<
endl;
253 Delete<Mesh>(iter()->io_);
264 const bool validBoundary
272 if (meshObjects::debug)
274 Pout<<
"meshObjects::addPatch(objectRegistry&, "
275 "const labelUList&, const bool) : updating " << Mesh::typeName
276 <<
" meshObjects for region " << obr.
name() <<
endl;
288 if (meshObjects::debug)
290 Pout<<
" Adding patch to " << iter()->io_.
name() <<
endl;
300 Delete<Mesh>(iter()->io_);
306 template<
class Mesh,
template<
class>
class MeshObjectType>
314 if (meshObjects::debug)
316 Pout<<
"meshObjects::clear(objectRegistry&) :"
317 <<
" clearing " << Mesh::typeName
318 <<
" meshObjects for region " << obr.
name() <<
endl;
323 Delete<Mesh>(iter()->io_);
331 template<
class>
class FromType,
332 template<
class>
class ToType
341 if (meshObjects::debug)
343 Pout<<
"meshObjects::clearUpto(objectRegistry&) :"
344 <<
" clearing " << Mesh::typeName
345 <<
" meshObjects for region " << obr.
name() <<
endl;
350 if (!
isA<ToType<Mesh>>(*iter()))
352 Delete<Mesh>(iter()->io_);
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
An STL-conforming hash table.
const word & name() const
Return name.
virtual const fileName & name() const
Return the name of the stream.
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
static void clearUpto(objectRegistry &)
Clear all meshObjects derived from FromType up to (but not including)
static void movePoints(objectRegistry &)
static void mapMesh(objectRegistry &, const polyMeshMap &)
static void clear(objectRegistry &)
static void distribute(objectRegistry &, const polyDistributionMap &)
static void addPatch(objectRegistry &, const label patchi)
static void topoChange(objectRegistry &, const polyTopoChangeMap &)
static void reorderPatches(objectRegistry &, const labelUList &newToOld, const bool validBoundary)
Registry of regIOobjects.
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
Class containing mesh-to-mesh mapping information.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
errorManip< error > abort(error &err)
bool isA(const Type &t)
Check if a dynamic_cast to typeid is possible.
prefixOSstream Pout(cout, "Pout")