Go to the documentation of this file.
53 #ifndef functionObjects_regionFunctionObject_H
54 #define functionObjects_regionFunctionObject_H
66 namespace functionObjects
73 class regionFunctionObject
75 public stateFunctionObject
85 const objectRegistry&
obr_;
89 mutable const objectRegistry*
obrPtr_;
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);
const objectRegistry & obr_
Reference to the region objectRegistry.
const ObjectType * lookupObjectPtr(const word &fieldName) const
Deprecated(2018-10)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
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.
A class for managing temporary objects.
ObjectType & lookupObjectRef(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
Base class for function objects, adding functionality to read/write state information (data required ...
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
const ObjectType * cfindObject(const word &fieldName) const
void clearObjects(const wordList &objNames)
Clear fields from the (sub) objectRegistry if present.
regionFunctionObject(const regionFunctionObject &)=delete
No copy construct.
Registry of regIOobjects.
bool foundObject(const word &fieldName) const
Find object (eg, a field) in the (sub) objectRegistry.
bool clearObject(const word &fieldName)
Clear field from the (sub) objectRegistry if present.
const objectRegistry * obrPtr_
Pointer to alternative (eg, sub-region) objectRegistry.
virtual ~regionFunctionObject()=default
Destructor.
void operator=(const regionFunctionObject &)=delete
No copy assignment.
const ObjectType * findObject(const word &fieldName) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
ObjectType * getObjectPtr(const word &fieldName) const
ObjectType * lookupObjectRefPtr(const word &fieldName) const
Deprecated(2018-10)
const word & name() const noexcept
Return the name of this functionObject.
TypeName("regionFunctionObject")
Runtime type information.
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.
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
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.