37namespace functionObjects
64 <<
"Could not locate subRegion \""
78 const regIOobject* ptr = this->cfindObject<regIOobject>(fieldName);
82 Log <<
" functionObjects::" <<
type() <<
" " <<
name()
83 <<
" writing field: " << ptr->
name() <<
endl;
100 regIOobject* ptr = this->findObject<regIOobject>(fieldName);
123 for (
const word& objName : objNames)
125 regIOobject* ptr = this->findObject<regIOobject>(objName);
145 subRegistryName_(
dict.getOrDefault<
word>(
"subRegion",
word::null)),
165 subRegistryName_(
dict.getOrDefault<
word>(
"subRegion",
word::null)),
const word & name() const noexcept
Return the object name.
virtual bool read()
Re-read model coefficients if they have changed.
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,...
Specialization of Foam::functionObject for a region and providing a reference to the region Foam::obj...
const objectRegistry & obr_
Reference to the region objectRegistry.
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
void clearObjects(const wordList &objNames)
Clear fields from the (sub) objectRegistry if present.
word subRegistryName_
Name for alternative object registry.
const objectRegistry * obrPtr_
Pointer to alternative (eg, sub-region) objectRegistry.
bool writeObject(const word &fieldName)
Write field if present in the (sub) objectRegistry.
bool clearObject(const word &fieldName)
Clear field from the (sub) objectRegistry if present.
Base class for function objects, adding functionality to read/write state information (data required ...
objectRegistry & storedObjects()
Registry of regIOobjects.
const Type * cfindObject(const word &name, const bool recursive=false) const
Return const pointer to the object of the given Type.
Mesh consisting of general polyhedral cells.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool write(const bool valid=true) const
Write using setting from DB.
bool ownedByRegistry() const noexcept
Is this object owned by the registry?
bool checkOut()
Remove all file watches and remove object from registry.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define WarningInFunction
Report a warning using Foam::Warning.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)