regIOobject is an abstract class derived from IOobject to handle automatic object registration with the objectRegistry. More...
Inherits IOobject.
Inherited by BlendedInterfacialModel< dragModel >, BlendedInterfacialModel< Foam::dragModel >, BlendedInterfacialModel< Foam::heatTransferModel >, BlendedInterfacialModel< Foam::liftModel >, BlendedInterfacialModel< Foam::turbulentDispersionModel >, BlendedInterfacialModel< Foam::virtualMassModel >, BlendedInterfacialModel< Foam::wallLubricationModel >, BlendedInterfacialModel< heatTransferModel >, BlendedInterfacialModel< liftModel >, BlendedInterfacialModel< phaseTransferModel >, BlendedInterfacialModel< turbulentDispersionModel >, BlendedInterfacialModel< virtualMassModel >, BlendedInterfacialModel< wallLubricationModel >, adjointSolverManager, ATCModel, baseIOdictionary, BlendedInterfacialModel< ModelType >, coordinateSystems, decomposedBlockData, populationBalanceModel, exprResultGlobals, fvExprDriverWriter, extendedFeatureEdgeMesh, faBoundaryMesh, featureEdgeMesh, fieldDictionary, GlobalIOField< Type >, GlobalIOList< Type >, adjointTurbulenceModel, IOList< T >, IOMap< T >, IOmapDistribute, IOmapDistributePolyMesh, IOPtrList< T >, lduPrimitiveMeshAssembly, lumpedPointIOMovement, meshObject, surfaceTensionModel, objectiveManager, objectRegistry, PDRDragModel, polyBoundaryMesh, polyBoundaryMeshEntries, polyTopoChanger, porosityModel, porousModel, rawIOField< Type >, refinementHistory, searchableSurface, SLGThermo, solutionControl, SubDimensionedField< Type, GeoMesh >, surfaceTensionModel, surfZoneIOList, topoSet, UniformDimensionedField< Type >, virtualMassModel, GlobalIOField< vector >, GlobalIOList< kinematicParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< reactingParcelInjectionData >, IOList< label >, IOList< labelList >, IOPtrList< Foam::entry >, UniformDimensionedField< scalar >, and UniformDimensionedField< vector >.
Public Member Functions | |
TypeName ("regIOobject") | |
Runtime type information. More... | |
regIOobject (const IOobject &io, const bool isTimeObject=false) | |
regIOobject (const regIOobject &rio) | |
Copy construct. More... | |
regIOobject (const regIOobject &rio, bool registerCopy) | |
regIOobject (const word &newName, const regIOobject &, bool registerCopy) | |
regIOobject (const IOobject &io, const regIOobject &rio) | |
Copy construct with new IO parameters. More... | |
virtual | ~regIOobject () |
Destructor. More... | |
bool | checkIn () |
Add object to registry, if not already registered. More... | |
bool | checkOut () |
Remove all file watches and remove object from registry. More... | |
virtual void | addWatch () |
Add file watch on object (if registered and READ_IF_MODIFIED) More... | |
bool | ownedByRegistry () const |
Is this object owned by the registry? More... | |
bool | store () |
void | release (const bool unregister=false) |
Release ownership of this object from its registry. More... | |
label | eventNo () const |
Event number at last update. More... | |
label & | eventNo () |
Event number at last update. More... | |
bool | upToDate (const regIOobject &) const |
Return true if up-to-date with respect to given object. More... | |
bool | upToDate (const regIOobject &, const regIOobject &) const |
Return true if up-to-date with respect to given objects. More... | |
bool | upToDate (const regIOobject &, const regIOobject &, const regIOobject &) const |
Return true if up-to-date with respect to given objects. More... | |
bool | upToDate (const regIOobject &, const regIOobject &, const regIOobject &, const regIOobject &) const |
Return true if up-to-date with respect to given objects. More... | |
void | setUpToDate () |
Set as up-to-date. More... | |
virtual void | rename (const word &newName) |
Rename. More... | |
const dictionary * | findMetaData () const noexcept |
Return pointer to meta-data or nullptr. More... | |
dictionary & | getMetaData () noexcept |
Get or create meta-data. More... | |
void | removeMetaData () |
Remove meta-data. More... | |
virtual void | updateMetaData () |
Update internal meta-data (eg, prior to writing) More... | |
virtual fileName | filePath () const |
Return complete path + object name if the file exists. More... | |
bool | headerOk () |
Read and check header info. More... | |
Istream & | readStream (const word &, const bool valid=true) |
Return Istream and check object type against that given. More... | |
void | close () |
Close Istream. More... | |
virtual bool | readData (Istream &) |
Virtual readData function. More... | |
virtual bool | read () |
Read object. More... | |
virtual label | addWatch (const fileName &) |
Add file watch for fileName on object if not yet watched. More... | |
const labelList & | watchIndices () const |
Return file-monitoring handles. More... | |
labelList & | watchIndices () |
Return file-monitoring handles. More... | |
virtual bool | modified () const |
virtual bool | readIfModified () |
Read object if modified (as set by call to modified) More... | |
virtual bool | writeData (Ostream &) const =0 |
Pure virtual writeData function. More... | |
virtual bool | writeObject (IOstreamOption streamOpt, const bool valid) const |
Write using stream options. More... | |
virtual bool | write (const bool valid=true) const |
Write using setting from DB. More... | |
virtual bool | global () const |
Is object global. More... | |
void | operator= (const IOobject &io) |
Copy assignment. More... | |
virtual bool | writeObject (IOstreamOption::streamFormat fmt, IOstreamOption::versionNumber ver, IOstreamOption::compressionType comp, const bool valid) const |
Write using given format, version and compression. More... | |
![]() | |
TypeName ("IOobject") | |
Declare type-name, virtual type (with debug switch) More... | |
IOobject (const IOobject &)=default | |
Copy construct. More... | |
virtual | ~IOobject ()=default |
Destructor. More... | |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
Construct from name, instance, registry, io options. More... | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
Construct from name, instance, local, registry, io options. More... | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true, bool globalObject=false) | |
Construct from path, registry, io options. More... | |
IOobject (const IOobject &io, const objectRegistry ®istry) | |
Copy construct, resetting registry. More... | |
IOobject (const IOobject &io, const word &name) | |
Copy construct, resetting name. More... | |
IOobject (const IOobject &io, readOption, writeOption) | |
Copy construct, resetting io options. More... | |
autoPtr< IOobject > | clone () const |
Clone. More... | |
autoPtr< IOobject > | clone (const objectRegistry ®istry) const |
Clone resetting registry. More... | |
const objectRegistry & | db () const noexcept |
Return the local objectRegistry. More... | |
const Time & | time () const |
Return Time associated with the objectRegistry. More... | |
const word & | name () const noexcept |
Return name. More... | |
const word & | headerClassName () const noexcept |
Return name of the class name read from header. More... | |
word & | headerClassName () noexcept |
Return non-constant access to the class name read from header. More... | |
const string & | note () const noexcept |
Return the optional note. More... | |
string & | note () noexcept |
Return non-constant access to the optional note. More... | |
bool | registerObject () const noexcept |
Should object created with this IOobject be registered? More... | |
bool | registerObject (bool on) noexcept |
Change registration preference, return previous value. More... | |
bool | globalObject () const noexcept |
Is object same for all processors? More... | |
bool | globalObject (bool on) noexcept |
Change global-object status, return previous value. More... | |
unsigned | labelByteSize () const noexcept |
The sizeof (label) in bytes, possibly read from the header. More... | |
unsigned | scalarByteSize () const noexcept |
The sizeof (scalar) in bytes, possibly read from the header. More... | |
bool | isHeaderClassName (const word &clsName) const |
Test if headerClassName() equals the given class name. More... | |
template<class Type > | |
bool | isHeaderClassName () const |
Test if headerClassName() equals Type::typeName. More... | |
readOption | readOpt () const noexcept |
The read option. More... | |
readOption | readOpt (readOption opt) noexcept |
Change the read option, return previous value. More... | |
writeOption | writeOpt () const noexcept |
The write option. More... | |
writeOption | writeOpt (writeOption opt) noexcept |
Change the write option, return previous value. More... | |
word | group () const |
Return group (extension part of name) More... | |
word | member () const |
Return member (name without the extension) More... | |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const noexcept |
fileName & | instance () noexcept |
const fileName & | local () const noexcept |
fileName | path () const |
The complete path. More... | |
fileName | path (const word &instance, const fileName &local=fileName::null) const |
The complete path with alternative instance and local. More... | |
fileName | objectPath () const |
The complete path + object name. More... | |
fileName | objectRelPath () const |
The object path relative to the root. More... | |
fileName | localFilePath (const word &typeName, const bool search=true) const |
Helper for filePath that searches locally. More... | |
fileName | globalFilePath (const word &typeName, const bool search=true) const |
Helper for filePath that searches up if in parallel. More... | |
IOstreamOption | parseHeader (const dictionary &headerDict) |
bool | readHeader (Istream &is) |
bool | readHeader (dictionary &headerDict, Istream &is) |
template<class Type > | |
bool | typeHeaderOk (const bool checkType=true, const bool search=true, const bool verbose=true) |
Read header (uses typeFilePath to find file) and check its info. More... | |
template<class Type > | |
void | warnNoRereading () const |
Helper: warn that type does not support re-reading. More... | |
bool | writeHeader (Ostream &os) const |
Write header with current type() More... | |
bool | writeHeader (Ostream &os, const word &objectType) const |
Write header with override of type. More... | |
void | writeHeader (dictionary &dict, IOstreamOption streamOpt) const |
void | writeHeader (dictionary &dict, const word &objectType, IOstreamOption streamOpt) const |
bool | good () const noexcept |
bool | bad () const noexcept |
InfoProxy< IOobject > | info () const |
Return info proxy. More... | |
void | operator= (const IOobject &io) |
readOption & | readOpt () noexcept |
Access to the read option. More... | |
writeOption & | writeOpt () noexcept |
Access to the write option. More... | |
bool & | registerObject () noexcept |
Access to the register object option. More... | |
bool & | globalObject () noexcept |
Access to the global object option. More... | |
template<> | |
bool | isHeaderClassName () const |
Specialization for void always returns true (no headerClassName check). More... | |
template<class StringType > | |
Foam::word | groupName (StringType base, const word &group) |
Static Public Member Functions | |
template<class Type > | |
static Type & | store (Type *p) |
Transfer pointer ownership to its registry. More... | |
template<class Type > | |
static Type & | store (autoPtr< Type > &ptr) |
Transfer pointer ownership to its registry. More... | |
template<class Type > | |
static Type & | store (autoPtr< Type > &&ptr) |
Transfer pointer ownership to its registry. More... | |
template<class Type > | |
static Type & | store (refPtr< Type > &ptr) |
Transfer pointer ownership to its registry. More... | |
template<class Type > | |
static Type & | store (refPtr< Type > &&ptr) |
Transfer pointer ownership to its registry. More... | |
template<class Type > | |
static Type & | store (tmp< Type > &ptr) |
Transfer pointer ownership to its registry. More... | |
template<class Type > | |
static Type & | store (tmp< Type > &&ptr) |
Transfer pointer ownership to its registry. More... | |
![]() | |
static bool | bannerEnabled () noexcept |
Status of output file banner. More... | |
static bool | bannerEnabled (bool on) noexcept |
Enable/disable an output file banner. More... | |
static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
Split path into instance, local, name components. More... | |
template<class StringType > | |
static word | groupName (StringType base, const word &group) |
Create dot-delimited name.group string. More... | |
static word | group (const word &name) |
Return group (extension part of name) More... | |
static word | member (const word &name) |
Return member (name without the extension) More... | |
static word | scopedName (const std::string &scope, const word &name) |
Create scope:name or scope_name string. More... | |
static IOobject | selectIO (const IOobject &io, const fileName &altFile, const word &ioName="") |
Return the IOobject, but also consider an alternative file name. More... | |
static Ostream & | writeBanner (Ostream &os, const bool noSyntaxHint=false) |
Write the standard OpenFOAM file/dictionary banner. More... | |
static Ostream & | writeDivider (Ostream &os) |
Write the standard file section divider. More... | |
static Ostream & | writeEndDivider (Ostream &os) |
Write the standard end file divider. More... | |
Protected Member Functions | |
bool | readHeaderOk (const IOstreamOption::streamFormat fmt, const word &typeName) |
Helper: check readOpt flags and read if necessary. More... | |
![]() | |
void | setBad (const string &s) |
Set the object state to bad. More... | |
Static Protected Attributes | |
static bool | masterOnlyReading = false |
To flag master-only reading of objects. More... | |
Friends | |
class | functionEntries::codeStream |
Friendship with classes needing access to masterOnlyReading. More... | |
class | fileOperations::uncollatedFileOperation |
Additional Inherited Members | |
![]() | |
enum | objectState : char { GOOD, BAD } |
Enumeration defining the valid states of an IOobject. More... | |
enum | readOption : char { MUST_READ, MUST_READ_IF_MODIFIED, READ_IF_PRESENT, NO_READ } |
Enumeration defining the read options. More... | |
enum | writeOption : char { AUTO_WRITE = 0, NO_WRITE = 1 } |
Enumeration defining the write options. More... | |
enum | fileCheckTypes : char { timeStamp, timeStampMaster, inotify, inotifyMaster } |
Enumeration defining the file checking options. More... | |
![]() | |
static const Enum< fileCheckTypes > | fileCheckTypesNames |
Names for the fileCheckTypes. More... | |
static char | scopeSeparator |
Character for scoping object names (':' or '_') More... | |
static fileCheckTypes | fileModificationChecking |
Type of file modification checking. More... | |
static float | fileModificationSkew |
Time skew (seconds) for file modification checks. More... | |
static int | maxFileModificationPolls |
Max number of times to poll for file modification changes. More... | |
![]() | |
static void | writeHeaderContent (Ostream &os, const IOobject &io, const word &objectType, const dictionary *metaDataDict=nullptr) |
static void | writeHeaderContent (dictionary &dict, const IOobject &io, const word &objectType, IOstreamOption streamOpt, const dictionary *metaDataDict=nullptr) |
regIOobject is an abstract class derived from IOobject to handle automatic object registration with the objectRegistry.
Definition at line 73 of file regIOobject.H.
regIOobject | ( | const IOobject & | io, |
const bool | isTimeObject = false |
||
) |
Construct from IOobject. The optional flag adds special handling if the object is the top-level regIOobject (eg, Time).
Definition at line 47 of file regIOobject.C.
References regIOobject::checkIn(), and IOobject::registerObject().
regIOobject | ( | const regIOobject & | rio | ) |
Copy construct.
Definition at line 65 of file regIOobject.C.
regIOobject | ( | const regIOobject & | rio, |
bool | registerCopy | ||
) |
Copy construct, transferring registry registration to the copy if registerCopy is true
Definition at line 79 of file regIOobject.C.
References regIOobject::checkIn(), and regIOobject::checkOut().
regIOobject | ( | const word & | newName, |
const regIOobject & | rio, | ||
bool | registerCopy | ||
) |
Copy construct with new name, transferring registry registration to the copy f registerCopy is true
Definition at line 102 of file regIOobject.C.
regIOobject | ( | const IOobject & | io, |
const regIOobject & | rio | ||
) |
Copy construct with new IO parameters.
Definition at line 127 of file regIOobject.C.
|
virtual |
Destructor.
Definition at line 149 of file regIOobject.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::name(), path(), Foam::Pout, and Foam::type().
|
protected |
Helper: check readOpt flags and read if necessary.
Definition at line 39 of file regIOobjectRead.C.
References Foam::fileHandler(), and fileOperation::read().
TypeName | ( | "regIOobject" | ) |
Runtime type information.
bool checkIn | ( | ) |
Add object to registry, if not already registered.
Definition at line 188 of file regIOobject.C.
References Foam::abort(), Foam::expressions::patchExpr::debug, polyMesh::defaultRegion, Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::name(), and WarningInFunction.
Referenced by regIOobject::regIOobject().
bool checkOut | ( | ) |
Remove all file watches and remove object from registry.
Definition at line 224 of file regIOobject.C.
References Foam::fileHandler(), forAllReverse, and fileOperation::removeWatch().
Referenced by regionFunctionObject::clearObject(), regionFunctionObject::clearObjects(), removeRegisteredObject::execute(), regIOobject::regIOobject(), and lumpedPointDisplacementPointPatchVectorField::~lumpedPointDisplacementPointPatchVectorField().
|
virtual |
Add file watch on object (if registered and READ_IF_MODIFIED)
Reimplemented in unwatchedIOdictionary.
Definition at line 267 of file regIOobject.C.
References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, Foam::fileHandler(), IOobject::fileModificationChecking, fileOperation::findWatch(), forAll, forAllReverse, fileOperation::getFile(), IOobject::inotifyMaster, UPstream::master(), UPstream::parRun(), fileOperation::removeWatch(), Pstream::scatter(), List< T >::setSize(), IOobject::timeStampMaster, and Foam::type().
Referenced by includeEntry::execute(), and IOMap< T >::IOMap().
|
inline |
Is this object owned by the registry?
Definition at line 31 of file regIOobjectI.H.
Referenced by objectRegistry::clear(), regionFunctionObject::clearObject(), regionFunctionObject::clearObjects(), objectRegistry::erase(), and removeRegisteredObject::execute().
|
inline |
Register object with its registry and transfer ownership to the registry.
Definition at line 37 of file regIOobjectI.H.
References Foam::name(), Foam::nl, and WarningInFunction.
Referenced by codedBase::codeDict(), mappedPatchBase::constructIOField(), fvMatrix< Type >::createOrUpdateLduPrimitiveAssembly(), CrankNicolsonDdtScheme< Type >::ddt0_(), volPointInterpolation::interpolate(), lumpedPointDisplacementPointPatchVectorField::movement(), options::New(), zoneDistribute::New(), zoneCPCStencil::New(), coordinateSystems::New(), polySurface::polySurface(), mappedPatchBase::storeField(), sampledSurface::storeSurfMesh(), objectRegistry::subRegistry(), and cellCellStencil::zoneID().
|
inlinestatic |
Transfer pointer ownership to its registry.
Definition at line 54 of file regIOobjectI.H.
References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and p.
|
inlinestatic |
Transfer pointer ownership to its registry.
Resets (clears) the parameter.
Definition at line 78 of file regIOobjectI.H.
References autoPtr< T >::release().
|
inlinestatic |
Transfer pointer ownership to its registry.
Resets (clears) the parameter.
Definition at line 86 of file regIOobjectI.H.
|
inlinestatic |
Transfer pointer ownership to its registry.
Changes parameter from PTR to CREF (do not rely on this).
Definition at line 94 of file regIOobjectI.H.
References refPtr< T >::cref(), refPtr< T >::get(), refPtr< T >::is_pointer(), p, refPtr< T >::release(), and WarningInFunction.
|
inlinestatic |
Transfer pointer ownership to its registry.
Changes parameter from PTR to CREF (do not rely on this).
Definition at line 127 of file regIOobjectI.H.
|
inlinestatic |
Transfer pointer ownership to its registry.
Changes parameter from PTR to CREF (do not rely on this).
Definition at line 135 of file regIOobjectI.H.
References tmp< T >::cref(), tmp< T >::get(), tmp< T >::is_pointer(), p, tmp< T >::ptr(), and WarningInFunction.
|
inlinestatic |
Transfer pointer ownership to its registry.
Changes parameter from PTR to CREF (do not rely on this).
Definition at line 168 of file regIOobjectI.H.
|
inline |
Release ownership of this object from its registry.
unregister | optionally set as non-registered |
Definition at line 175 of file regIOobjectI.H.
Referenced by objectRegistry::clear(), and objectRegistry::erase().
|
inline |
Event number at last update.
Definition at line 185 of file regIOobjectI.H.
Referenced by triSurfaceMesh::movePoints(), polyMesh::setUpToDatePoints(), cyclicACMIPolyPatch::updateAreas(), and regIOobject::upToDate().
|
inline |
Event number at last update.
Definition at line 190 of file regIOobjectI.H.
bool upToDate | ( | const regIOobject & | a | ) | const |
Return true if up-to-date with respect to given object.
Definition at line 337 of file regIOobject.C.
References regIOobject::eventNo(), and Foam::labelMax.
Referenced by cyclicACMIPolyPatch::upToDate(), and polyMesh::upToDatePoints().
bool upToDate | ( | const regIOobject & | a, |
const regIOobject & | b | ||
) | const |
Return true if up-to-date with respect to given objects.
Definition at line 377 of file regIOobject.C.
References Foam::constant::physicoChemical::b.
bool upToDate | ( | const regIOobject & | a, |
const regIOobject & | b, | ||
const regIOobject & | c | ||
) | const |
Return true if up-to-date with respect to given objects.
Definition at line 387 of file regIOobject.C.
References Foam::constant::physicoChemical::b, and Foam::constant::universal::c.
bool upToDate | ( | const regIOobject & | a, |
const regIOobject & | b, | ||
const regIOobject & | c, | ||
const regIOobject & | d | ||
) | const |
Return true if up-to-date with respect to given objects.
Definition at line 398 of file regIOobject.C.
References Foam::constant::physicoChemical::b, and Foam::constant::universal::c.
void setUpToDate | ( | ) |
Set as up-to-date.
Definition at line 409 of file regIOobject.C.
Referenced by cyclicACMIPolyPatch::setUpToDate(), and cyclicACMIPolyPatch::updateAreas().
|
virtual |
Rename.
Reimplemented from IOobject.
Reimplemented in objectRegistry.
Definition at line 415 of file regIOobject.C.
References IOobject::rename().
Referenced by objectRegistry::rename().
|
virtualnoexcept |
Return pointer to meta-data or nullptr.
Reimplemented from IOobject.
Definition at line 33 of file regIOobjectMetaData.C.
|
noexcept |
Get or create meta-data.
Definition at line 39 of file regIOobjectMetaData.C.
void removeMetaData | ( | ) |
Remove meta-data.
Definition at line 49 of file regIOobjectMetaData.C.
|
virtual |
Update internal meta-data (eg, prior to writing)
Definition at line 55 of file regIOobjectMetaData.C.
|
virtual |
Return complete path + object name if the file exists.
in the case directory otherwise null. Does not search up if parallel. Can be overridden to provide this functionality (e.g. IOdictionary)
Reimplemented in baseIOdictionary, distributedTriSurfaceMesh, triSurfaceMesh, porosityModel, searchableSurface, extendedFeatureEdgeMesh, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, unwatchedIOdictionary, IOdictionary, localIOdictionary, GlobalIOField< Type >, IOMap< T >, GlobalIOField< vector >, featureEdgeMesh, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, and GlobalIOList< kinematicParcelInjectionData >.
Definition at line 430 of file regIOobject.C.
References Foam::type().
Referenced by rawIOField< Type >::rawIOField(), and decomposedBlockData::read().
bool headerOk | ( | ) |
Read and check header info.
Definition at line 436 of file regIOobject.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::fileHandler(), IOWarningInFunction, fileOperation::readHeader(), and Foam::type().
Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), featureEdgeMesh::featureEdgeMesh(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), rawIOField< Type >::rawIOField(), boundaryRegion::readDict(), cellTable::readDict(), refinementHistory::refinementHistory(), and topoSet::topoSet().
Foam::Istream & readStream | ( | const word & | expectName, |
const bool | valid = true |
||
) |
Return Istream and check object type against that given.
Definition at line 129 of file regIOobjectRead.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, Foam::name(), Foam::Pout, and Foam::type().
Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), featureEdgeMesh::featureEdgeMesh(), fieldDictionary::fieldDictionary(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), rawIOField< Type >::rawIOField(), refinementHistory::refinementHistory(), and topoSet::topoSet().
void close | ( | ) |
Close Istream.
Definition at line 171 of file regIOobjectRead.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and Foam::Pout.
Referenced by extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), featureEdgeMesh::featureEdgeMesh(), fieldDictionary::fieldDictionary(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), rawIOField< Type >::rawIOField(), uncollatedFileOperation::read(), adjointRASModel::read(), masterUncollatedFileOperation::read(), refinementHistory::refinementHistory(), and topoSet::topoSet().
Virtual readData function.
Must be defined in derived types for which re-reading is required
Reimplemented in exprResultGlobals, GlobalIOField< Type >, GlobalIOField< vector >, lumpedPointIOMovement, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< kinematicParcelInjectionData >, fvExprDriverWriter, IOmapDistributePolyMesh, refinementHistory, extendedFeatureEdgeMesh, baseIOdictionary, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, featureEdgeMesh, and IOmapDistribute.
Definition at line 185 of file regIOobjectRead.C.
Referenced by uncollatedFileOperation::read(), and masterUncollatedFileOperation::read().
|
virtual |
Read object.
Reimplemented in radiationModel, adjointTurbulenceModel, phaseChangeTwoPhaseMixture, turbulenceModel, phaseSystem, basicThermo, phaseSystem, Time, refinementHistory, adjointSpalartAllmaras, schemesLookup, twoPhaseMixtureThermo, adjointRASModel, twoPhaseMixtureEThermo, solarLoad, multiphaseSystem, multiphaseMixture, laserDTRM, fvDOM, kinematicSingleLayer, incompressibleThreePhaseMixture, diffusionMulticomponent< ReactionThermo, ThermoType >, EDC< ReactionThermo >, thermoSingleLayer, crankConRod, incompressibleTwoPhaseInteractingMixture, viewFactor, solidThermo, rigidBodyMeshMotion, twoPhaseSystem, motionSolver, decomposedBlockData, solution, reactingOneDim, multiphaseSystem, engineTime, incompressibleTwoPhaseMixture, rigidBodyMeshMotionSolver, FSD< ReactionThermo, ThermoType >, combustionModel, temperaturePhaseChangeTwoPhaseMixture, SRFModel, sixDoFRigidBodyMotionSolver, interfaceHeatResistance, thermoIncompressibleTwoPhaseMixture, SIMPLEControl, adjointLaminar, regionModel, CombustionModel< ReactionThermo >, solutionControl, optimisationManager, SchnerrSauer, zoneCombustion< ReactionThermo >, P1, Kunz, laminar< ReactionThermo >, eddyDissipationDiffusionModel< ReactionThermo, ThermoType >, PaSR< ReactionThermo >, eddyDissipationModelBase< ReactionThermo, ThermoType >, IOMRFZoneList, thermalBaffle, Merkle, singleStepCombustion< ReactionThermo, ThermoType >, diffusion< ReactionThermo, ThermoType >, singlePhaseTransportModel, constant, pimpleControl, infinitelyFastChemistry< ReactionThermo, ThermoType >, regionModel1D, noCombustion< ReactionThermo >, options, options, thermalBaffleModel, opaqueSolid, noRadiation, tolerances, rpm, singleLayerRegion, pyrolysisModel, IOporosityModelList, immiscibleIncompressibleTwoPhaseMixture, surfaceFilmRegionModel, thermo, noPyrolysis, noThermo, SIMPLEControlOpt, SIMPLEControlSingleRun, and simpleControl.
Definition at line 191 of file regIOobjectRead.C.
References IOstreamOption::BINARY, Foam::fileHandler(), IOobject::fileModificationChecking, forAll, forAllReverse, fileOperation::getFile(), IOobject::inotifyMaster, fileOperation::read(), fileOperation::removeWatch(), List< T >::setSize(), IOobject::timeStampMaster, and Foam::type().
Referenced by IOporosityModelList::read(), tolerances::read(), singlePhaseTransportModel::read(), IOMRFZoneList::read(), turbulenceModel::read(), optimisationManager::read(), regionModel::read(), SRFModel::read(), combustionModel::read(), incompressibleTwoPhaseMixture::read(), solution::read(), motionSolver::read(), twoPhaseSystem::read(), solidThermo::read(), radiationModel::read(), multiphaseSystem::read(), schemesLookup::read(), basicThermo::read(), and phaseSystem::read().
|
virtual |
Add file watch for fileName on object if not yet watched.
Reimplemented in unwatchedIOdictionary.
Definition at line 243 of file regIOobject.C.
References f(), Foam::fileHandler(), and fileOperation::findWatch().
|
inline |
Return file-monitoring handles.
Definition at line 196 of file regIOobjectI.H.
Referenced by fileOperation::addWatches(), masterUncollatedFileOperation::addWatches(), and Time::readDict().
|
inline |
Return file-monitoring handles.
Definition at line 202 of file regIOobjectI.H.
|
virtual |
Return true if the object's file (or files for objectRegistry) have been modified. (modified state is cached by Time)
Reimplemented in objectRegistry.
Definition at line 237 of file regIOobjectRead.C.
References Foam::fileHandler(), forAllReverse, and fileMonitor::UNMODIFIED.
|
virtual |
Read object if modified (as set by call to modified)
Reimplemented in objectRegistry.
Definition at line 251 of file regIOobjectRead.C.
References Foam::endl(), Foam::fileHandler(), forAllReverse, fileOperation::getFile(), InfoInFunction, Foam::name(), Foam::read(), and fileMonitor::UNMODIFIED.
Pure virtual writeData function.
Must be defined in derived types
Implemented in surfaceTensionModel, searchableSurfaceWithGaps, polyBoundaryMesh, porosityModel, profiling, solidification, powerLawLopesdaCosta, faBoundaryMesh, adjointSimple, BlendedInterfacialModel< ModelType >, BlendedInterfacialModel< virtualMassModel >, BlendedInterfacialModel< Foam::wallLubricationModel >, BlendedInterfacialModel< Foam::dragModel >, BlendedInterfacialModel< liftModel >, BlendedInterfacialModel< Foam::heatTransferModel >, BlendedInterfacialModel< Foam::virtualMassModel >, BlendedInterfacialModel< Foam::liftModel >, BlendedInterfacialModel< dragModel >, BlendedInterfacialModel< Foam::turbulentDispersionModel >, BlendedInterfacialModel< heatTransferModel >, BlendedInterfacialModel< phaseTransferModel >, BlendedInterfacialModel< turbulentDispersionModel >, BlendedInterfacialModel< wallLubricationModel >, DarcyForchheimer, exprResultGlobals, decomposedBlockData, coordinateSystems, powerLaw, fixedCoeff, simple, virtualMassModel, virtualMassModel, temperatureDependent, MeshObject< fvMesh, MoveableMeshObject, FitDataType >, MeshObject< polyMesh, UpdateableMeshObject, decompositionModel >, MeshObject< polyMesh, GeometricMeshObject, meshSearchMeshObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCPCCellToFaceStencilObject >, MeshObject< fvMesh, MoveableMeshObject, CentredFitData< Polynomial > >, MeshObject< polyMesh, UpdateableMeshObject, twoDPointCorrector >, MeshObject< fvMesh, UpdateableMeshObject, wallDist >, MeshObject< faMesh, Foam::MoveableMeshObject, leastSquaresFaVectors >, MeshObject< fvMesh, TopologicalMeshObject, zoneDistribute >, MeshObject< pointMesh, UpdateableMeshObject, pointConstraints >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCFaceToCellStencilObject >, MeshObject< polyMesh, GeometricMeshObject, meshSearchFACE_CENTRE_TRISMeshObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCPCCellToCellStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, centredCECCellToCellStencilObject >, MeshObject< fvMesh, MoveableMeshObject, LeastSquaresVectors< Stencil > >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCCellToCellStencilObject >, MeshObject< polyMesh, MoveableMeshObject, cellAspectRatio >, MeshObject< fvMesh, MoveableMeshObject, leastSquaresVectors >, MeshObject< fvMesh, Foam::GeometricMeshObject, boundaryRadiationProperties >, MeshObject< fvMesh, TopologicalMeshObject, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindCECCellToFaceStencilObject >, MeshObject< fvMesh, UpdateableMeshObject, volPointInterpolation >, MeshObject< lduMesh, GeometricMeshObject, GAMGAgglomeration >, MeshObject< fvMesh, TopologicalMeshObject, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, TopologicalMeshObject, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, UpdateableMeshObject, volBSplinesBase >, MeshObject< polyMesh, TopologicalMeshObject, regionSplit >, MeshObject< fvMesh, MoveableMeshObject, skewCorrectionVectors >, MeshObject< polyMesh, Foam::UpdateableMeshObject, faMesh >, MeshObject< fvMesh, TopologicalMeshObject, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, MoveableMeshObject, UpwindFitData< Polynomial > >, MeshObject< fvMesh, TopologicalMeshObject, centredCFCCellToFaceStencilObject >, MeshObject< polyMesh, UpdateableMeshObject, pointMesh >, MeshObject< Time, TopologicalMeshObject, multiWorldConnections >, MeshObject< fvMesh, TopologicalMeshObject, centredFECCellToFaceStencilObject >, MeshObject< Time, TopologicalMeshObject, gravity >, MeshObject< fvMesh, MoveableMeshObject, CentredFitSnGradData< Polynomial > >, MeshObject< fvMesh, TopologicalMeshObject, zoneCPCStencil >, surfaceTensionModel, RASTurbulenceModel, liquidProperties, surfaceTensionModel, porousModel, GlobalIOField< Type >, GlobalIOField< vector >, lumpedPointIOMovement, constant, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, GlobalIOList< kinematicParcelInjectionData >, fvExprDriverWriter, IOmapDistributePolyMesh, IOPtrList< T >, IOPtrList< Foam::entry >, IOMap< T >, rawIOField< Type >, IOList< T >, IOList< label >, IOList< labelList >, fieldDictionary, surfZoneIOList, objectRegistry, populationBalanceModel, refinementHistory, searchableSphere, topoSet, triSurfaceMesh, searchableCone, searchableSurfaceCollection, searchableBox, searchableRotatedBox, searchableCylinder, searchableDisk, searchablePlate, searchableExtrudedCircle, searchablePlane, lduPrimitiveMeshAssembly, adjointTurbulenceModel, ATCModel, objectiveManager, solver, adjointSolverManager, solutionControl, PDRDragModel, polyTopoChanger, extendedFeatureEdgeMesh, baseIOdictionary, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, featureEdgeMesh, IOmapDistribute, polyBoundaryMeshEntries, and SLGThermo.
Referenced by uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), decomposedBlockData::writeBlockEntry(), searchableSurfaceWithGaps::writeData(), mappedPatchBase::writeDict(), collatedFileOperation::writeObject(), fileOperation::writeObject(), and masterUncollatedFileOperation::writeObject().
|
virtual |
Write using stream options.
uncomment this if you want to write global objects on master only
bool isGlobal = global();
Reimplemented in profiling, coordinateSystems, distributedTriSurfaceMesh, objectRegistry, fvMesh, Time, polySurface, dynamicOversetFvMesh, triSurfaceMesh, surfMesh, polyBoundaryMesh, dynamicRefineFvMesh, faBoundaryMesh, decomposedBlockData, rigidBodyMeshMotion, motionSolver, faceZoneSet, rigidBodyMeshMotionSolver, sixDoFRigidBodyMotionSolver, pointZoneSet, and cellZoneSet.
Definition at line 36 of file regIOobjectWrite.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::fileHandler(), IOobject::instance(), Foam::name(), Foam::Pout, SeriousErrorInFunction, fileOperation::setUnmodified(), Foam::system(), timeName, and fileOperation::writeObject().
Referenced by regIOobject::write(), CompactIOField< T, BaseType >::writeObject(), cellZoneSet::writeObject(), pointZoneSet::writeObject(), faceZoneSet::writeObject(), coordinateSystems::writeObject(), faBoundaryMesh::writeObject(), profiling::writeObject(), and polyBoundaryMesh::writeObject().
Write using setting from DB.
Reimplemented in SIMPLEControl, faMesh, fvMesh, objectiveIncompressible, solver, incompressibleAdjointSolver, incompressiblePrimalSolver, SIMPLEControlOpt, and SIMPLEControlSingleRun.
Definition at line 132 of file regIOobjectWrite.C.
References IOobject::time(), and regIOobject::writeObject().
Referenced by columnFvMesh::columnFvMesh(), hexRef8::consistentSlowRefinement2(), dynamicRefineFvMesh::init(), SIMPLEControlOpt::loop(), meshRefinement::mergePatchFacesUndo(), polyMesh::movePoints(), polyMesh::polyMesh(), removeFaces::setRefinement(), hexRef8::setUnrefinement(), SIMPLEControlSingleRun::write(), surfaceInterpolate::write(), writeObjects::write(), columnAverage::write(), zeroGradient::write(), ddt2::write(), ObukhovLength::write(), regionSizeDistribution::write(), fvMesh::write(), faMeshReconstructor::writeAddressing(), faMeshDecomposition::writeDecomposition(), faMeshReconstructor::writeMesh(), regionFunctionObject::writeObject(), and isoAdvection::writeSurfaceCells().
|
inlinevirtual |
Is object global.
Reimplemented in baseIOdictionary, distributedTriSurfaceMesh, triSurfaceMesh, porosityModel, searchableSurface, extendedFeatureEdgeMesh, UniformDimensionedField< Type >, UniformDimensionedField< scalar >, UniformDimensionedField< vector >, unwatchedIOdictionary, IOdictionary, localIOdictionary, GlobalIOField< Type >, IOMap< T >, GlobalIOField< vector >, featureEdgeMesh, GlobalIOList< Type >, GlobalIOList< reactingParcelInjectionData >, GlobalIOList< reactingMultiphaseParcelInjectionData >, and GlobalIOList< kinematicParcelInjectionData >.
Definition at line 354 of file regIOobject.H.
Referenced by masterUncollatedFileOperation::readStream(), and collatedFileOperation::writeObject().
void operator= | ( | const IOobject & | io | ) |
Copy assignment.
Definition at line 457 of file regIOobject.C.
References IOobject::operator=().
|
virtual |
Write using given format, version and compression.
Definition at line 143 of file regIOobjectWrite.C.
|
friend |
Friendship with classes needing access to masterOnlyReading.
Definition at line 125 of file regIOobject.H.
|
friend |
Definition at line 126 of file regIOobject.H.
|
staticprotected |
To flag master-only reading of objects.
Definition at line 87 of file regIOobject.H.