33 template<
class GeoMeshType>
52 const auto* subreg = isA<objectRegistry>(iter.val());
54 if (subreg && (ioptr = subreg->cfindObject<
regIOobject>(fieldName)))
64 template<
class GeoMeshType>
81 const auto* subreg = isA<objectRegistry>(iter.val());
83 if (subreg && subreg->contains(fieldName))
93 template<
class Type,
class GeoMeshType>
97 const word& fieldName,
106 auto* fldptr = fieldDb.
getObjectPtr<fieldType>(fieldName);
110 fldptr->dimensions().reset(dims);
115 fldptr =
new fieldType
136 template<
class Type,
class GeoMeshType>
140 const word& fieldName,
150 auto* fldptr = fieldDb.
getObjectPtr<fieldType>(fieldName);
154 fldptr->dimensions().reset(dims);
159 fldptr =
new fieldType
180 template<
class Type,
class GeoMeshType>
184 const word& fieldName,
194 auto* fldptr = fieldDb.
getObjectPtr<fieldType>(fieldName);
198 fldptr->dimensions().reset(dims);
199 fldptr->field() = std::move(
values);
203 fldptr =
new fieldType
bool contains(const word &name, const bool recursive=false) const
Does the registry contain the regIOobject object (by name).
Fields (face and point) for polySurface.
bool store()
Register object with its registry and transfer ownership to the registry.
DimensionedField< Type, GeoMeshType > & storeField(const word &fieldName, const dimensionSet &dims, const Field< Type > &values)
Copy/store named field as face or point data (template parameter).
Ignore writing from objectRegistry::writeObject()
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Generic templated field type.
A class for handling words, derived from Foam::string.
Type * getObjectPtr(const word &name, const bool recursive=false) const
Return non-const pointer to the object of the given Type, using a const-cast to have it behave like a...
const objectRegistry * whichRegistry(const word &fieldName) const
General finding of the registry with the field object (FACE or POINT).
const regIOobject * findFieldObject(const word &fieldName, const FieldAssociation association) const
Find the field object with the given name and required FieldAssociation (FACE or POINT).
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
DimensionedField< Type, GeoMeshType > & newField(const word &fieldName, const dimensionSet &dims)
Create/store named zero field as face or point data (template parameter).
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
IOobject newIOobject(const word &name, IOobjectOption ioOpt) const
Create an IOobject at the current time instance (timeName) with the specified options.
Registry of regIOobjects.
Request registration (bool: true)
forAllConstIters(mixture.phases(), phase)