53#ifndef functionObjects_regionFunctionObject_H
54#define functionObjects_regionFunctionObject_H
66namespace functionObjects
73class 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);
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const word & name() const noexcept
Return the name of this functionObject.
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
ObjectType * lookupObjectRefPtr(const word &fieldName) const
Deprecated(2018-10)
const ObjectType & lookupObject(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
const ObjectType * cfindObject(const word &fieldName) const
bool foundObject(const word &fieldName) const
Find object (eg, a field) in the (sub) objectRegistry.
const ObjectType * lookupObjectPtr(const word &fieldName) const
Deprecated(2018-10)
ObjectType * getObjectPtr(const word &fieldName) const
const objectRegistry & obr_
Reference to the region objectRegistry.
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
virtual ~regionFunctionObject()=default
Destructor.
void clearObjects(const wordList &objNames)
Clear fields from the (sub) objectRegistry if present.
regionFunctionObject(const regionFunctionObject &)=delete
No copy construct.
virtual bool read(const dictionary &dict)
Read optional controls.
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
word subRegistryName_
Name for alternative object registry.
const objectRegistry * obrPtr_
Pointer to alternative (eg, sub-region) objectRegistry.
const ObjectType * findObject(const word &fieldName) const
void operator=(const regionFunctionObject &)=delete
No copy assignment.
bool writeObject(const word &fieldName)
Write field if present in the (sub) objectRegistry.
bool storeInDb(const word &fieldName, const tmp< ObjectType > &tfield, const objectRegistry &obr)
Store the field in an optional objectRegistry under the given name.
bool clearObject(const word &fieldName)
Clear field from the (sub) objectRegistry if present.
ObjectType & lookupObjectRef(const word &fieldName) const
Lookup and return object (eg, a field) from the (sub) objectRegistry.
TypeName("regionFunctionObject")
Runtime type information.
Base class for function objects, adding functionality to read/write state information (data required ...
Registry of regIOobjects.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define FOAM_DEPRECATED_FOR(since, replacement)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.