53 #ifndef functionObjects_regionFunctionObject_H 54 #define functionObjects_regionFunctionObject_H 66 namespace functionObjects
73 class regionFunctionObject
75 public stateFunctionObject
85 const objectRegistry&
obr_;
99 template<
class ObjectType>
106 template<
class ObjectType>
113 template<
class ObjectType>
120 template<
class ObjectType>
128 template<
class ObjectType>
132 template<
class ObjectType>
136 template<
class ObjectType>
141 template<
class ObjectType>
146 bool cacheable =
false 150 template<
class ObjectType>
153 const word& fieldName,
216 template<
class ObjectType>
220 return this->cfindObject<ObjectType>(fieldName);
225 template<
class ObjectType>
229 return this->getObjectPtr<ObjectType>(fieldName);
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
bool writeObject(const word &fieldName)
Write field if present in the (sub) objectRegistry.
regionFunctionObject(const regionFunctionObject &)=delete
No copy construct.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const ObjectType * cfindObject(const word &fieldName) const
Return const pointer to the object (eg, a field) in the (sub) objectRegistry.
const ObjectType * lookupObjectPtr(const word &fieldName) const
Deprecated(2018-10)
word subRegistryName_
Name for alternative object registry.
const ObjectType & lookupObject(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual ~regionFunctionObject()=default
Destructor.
const word & name() const noexcept
Return the name of this functionObject.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
ObjectType & lookupObjectRef(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
A class for handling words, derived from Foam::string.
TypeName("regionFunctionObject")
Runtime type information.
ObjectType * getObjectPtr(const word &fieldName) const
Return non-const pointer to the object of the given Type, using a const-cast to have it behave like a...
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
void clearObjects(const wordList &objNames)
Clear fields from the (sub) objectRegistry if present.
bool foundObject(const word &fieldName) const
Find object (eg, a field) in the (sub) objectRegistry.
const objectRegistry * obrPtr_
Pointer to alternative (eg, sub-region) objectRegistry.
bool clearObject(const word &fieldName)
Clear field from the (sub) objectRegistry if present.
const ObjectType * findObject(const word &fieldName) const
Return const pointer to the object (eg, a field) in the (sub) objectRegistry.
void operator=(const regionFunctionObject &)=delete
No copy assignment.
const objectRegistry & obr_
Reference to the region objectRegistry.
virtual bool read(const dictionary &dict)
Read optional controls.
A class for managing temporary objects.
ObjectType * lookupObjectRefPtr(const word &fieldName) const
Deprecated(2018-10)
Registry of regIOobjects.
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
bool storeInDb(const word &fieldName, const tmp< ObjectType > &tfield, const objectRegistry &obr)
Store the field in an optional objectRegistry under the given name.