regIOobject is an abstract class derived from IOobject to handle automatic object registration with the objectRegistry. More...
#include <OpenFOAM/regIOobject.H>
regIOobject is an abstract class derived from IOobject to handle automatic object registration with the objectRegistry.
Definition at line 55 of file regIOobject.H.
Inherits IOobject.
Inherited by DimensionedField< scalar, pointMesh >, DimensionedField< scalar, surfaceMesh >, DimensionedField< scalar, volMesh >, DimensionedField< symmTensor, volMesh >, DimensionedField< tensor, volMesh >, DimensionedField< Type, pointMesh >, DimensionedField< Type, surfaceMesh >, DimensionedField< Type, volMesh >, DimensionedField< vector, pointMesh >, DimensionedField< vector, volMesh >, AverageIOField< Type >, DimensionedField< Type, GeoMesh >, featureEdgeMesh, fieldDictionary, IOdictionary, IOField< Type >, IOList< T >, IOMap< T >, IOPosition< ParticleType >, IOPtrList< T >, MeshObject< Mesh, Type >, objectRegistry, PDRDragModel, polyBoundaryMesh, polyBoundaryMeshEntries, polyTopoChanger, refinementHistory, searchableSurface, SubDimensionedField< Type, GeoMesh >, surfacePatchIOList, surfZoneIOList, topoSet, UniformDimensionedField< Type >, ZoneMesh< ZoneType, MeshType >, IOField< vector >, IOList< face >, IOList< kinematicParcelInjectionData >, IOList< label >, IOList< reactingMultiphaseParcelInjectionData >, IOList< reactingParcelInjectionData >, IOPtrList< coordinateSystem >, IOPtrList< injector >, IOPtrList< MRFZone >, IOPtrList< porousZone >, IOPtrList< TimeActivatedExplicitSource< Type > >, MeshObject< fvMesh, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, centredCFCCellToFaceStencilObject >, MeshObject< fvMesh, centredCFCFaceToCellStencilObject >, MeshObject< fvMesh, centredCPCCellToFaceStencilObject >, MeshObject< fvMesh, centredFECCellToFaceStencilObject >, MeshObject< fvMesh, CentredFitData< Polynomial > >, MeshObject< fvMesh, extendedLeastSquaresVectors >, MeshObject< fvMesh, FitDataType >, MeshObject< fvMesh, leastSquaresVectors >, MeshObject< fvMesh, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, quadraticFitSnGradData >, MeshObject< fvMesh, skewCorrectionVectors >, MeshObject< fvMesh, upwindCECCellToFaceStencilObject >, MeshObject< fvMesh, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, UpwindFitData< Polynomial > >, MeshObject< fvMesh, volPointInterpolation >, MeshObject< lduMesh, GAMGAgglomeration >, MeshObject< polyMesh, pointMesh >, ZoneMesh< cellZone, polyMesh >, ZoneMesh< faceZone, polyMesh >, and ZoneMesh< pointZone, polyMesh >.
Public Member Functions | |
TypeName ("regIOobject") | |
Runtime type information. | |
regIOobject (const IOobject &, const bool isTime=false) | |
Construct from IOobject. Optional flag for if IOobject is the. | |
regIOobject (const regIOobject &) | |
Construct as copy. | |
regIOobject (const regIOobject &, bool registerCopy) | |
Construct as copy, and transferring registry registration to copy. | |
virtual | ~regIOobject () |
bool | checkIn () |
Add object to registry. | |
bool | checkOut () |
Remove object from registry. | |
bool | ownedByRegistry () const |
Is this object owned by the registry? | |
void | store () |
Transfer ownership of this object to its registry. | |
void | release () |
Release ownership of this object from its registry. | |
label | eventNo () const |
Event number at last update. | |
label & | eventNo () |
Event number at last update. | |
bool | upToDate (const word &) const |
Am I uptodate with respect to other regIOobjects. | |
bool | upToDate (const word &, const word &) const |
bool | upToDate (const word &, const word &, const word &) const |
bool | upToDate (const word &, const word &, const word &, const word &) const |
void | setUpToDate () |
Flag me as up to date. | |
virtual void | rename (const word &newName) |
Rename. | |
Istream & | readStream (const word &) |
Return Istream and check object type against that given. | |
void | close () |
Close Istream. | |
virtual bool | readData (Istream &) |
Virtual readData function. | |
virtual bool | read () |
Read object. | |
virtual bool | modified () const |
Return true if the object's file has been modified. | |
virtual bool | readIfModified () |
Read object if modified. | |
virtual bool | writeData (Ostream &) const =0 |
Pure virtual writaData function. | |
virtual bool | writeObject (IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType) const |
Write using given format, version and compression. | |
virtual bool | write () const |
Write using setting from DB. | |
void | operator= (const IOobject &) |
![]() | |
TypeName ("IOobject") | |
Runtime type information. | |
IOobject (const word &name, const fileName &instance, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, registry, io options. | |
IOobject (const word &name, const fileName &instance, const fileName &local, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from name, instance, local, registry, io options. | |
IOobject (const fileName &path, const objectRegistry ®istry, readOption r=NO_READ, writeOption w=NO_WRITE, bool registerObject=true) | |
Construct from path, registry, io options. | |
Foam::autoPtr< IOobject > | clone () const |
Clone. | |
virtual | ~IOobject () |
const Time & | time () const |
Return time. | |
const objectRegistry & | db () const |
Return the local objectRegistry. | |
const word & | name () const |
Return name. | |
const word & | headerClassName () const |
Return name of the class name read from header. | |
string & | note () |
Return non-constant access to the optional note. | |
const string & | note () const |
Return the optional note. | |
bool | registerObject () const |
Register object created from this IOobject with registry if true. | |
readOption | readOpt () const |
readOption & | readOpt () |
writeOption | writeOpt () const |
writeOption & | writeOpt () |
const fileName & | rootPath () const |
const fileName & | caseName () const |
const fileName & | instance () const |
fileName & | instance () |
const fileName & | local () const |
fileName | path () const |
Return complete path. | |
fileName | path (const word &instance, const fileName &local="") const |
Return complete path with alternative instance and local. | |
fileName | objectPath () const |
Return complete path + object name. | |
fileName | filePath () const |
Return complete path + object name if the file exists. | |
bool | readHeader (Istream &) |
Read header. | |
bool | headerOk () |
Read and check header info. | |
bool | writeHeader (Ostream &) const |
Write header. | |
bool | good () const |
bool | bad () const |
InfoProxy< IOobject > | info () const |
Return info proxy. |
Static Public Member Functions | |
template<class Type > | |
static Type & | store (Type *) |
Transfer ownership of the given object pointer to its registry. | |
template<class Type > | |
static Type & | store (autoPtr< Type > &) |
Transfer ownership of the given object pointer to its registry. | |
![]() | |
static bool | fileNameComponents (const fileName &path, fileName &instance, fileName &local, word &name) |
Split path into instance, local, name components. | |
template<class Stream > | |
static Stream & | writeBanner (Stream &os, bool noHint=false) |
Write the standard OpenFOAM file/dictionary banner. | |
template<class Stream > | |
static Stream & | writeDivider (Stream &os) |
Write the standard file section divider. | |
template<class Stream > | |
static Stream & | writeEndDivider (Stream &os) |
Write the standard end file divider. |
Static Public Attributes | |
static int | fileModificationSkew |
Additional Inherited Members | |
![]() | |
enum | objectState { GOOD, BAD } |
Enumeration defining the valid states of an IOobject. More... | |
enum | readOption { MUST_READ, READ_IF_PRESENT, NO_READ } |
Enumeration defining the read options. More... | |
enum | writeOption { AUTO_WRITE = 0, NO_WRITE = 1 } |
Enumeration defining the write options. More... | |
![]() | |
Istream * | objectStream () |
Construct and return an IFstream for the object. | |
void | setBad (const string &) |
Set the object state to bad. | |
![]() | |
static const char * | getBannerString (bool noHint) |
regIOobject | ( | const IOobject & | io, |
const bool | isTime = false |
||
) |
Construct from IOobject. Optional flag for if IOobject is the.
top level regIOobject.
Definition at line 43 of file regIOobject.C.
References regIOobject::checkIn(), and IOobject::registerObject().
regIOobject | ( | const regIOobject & | rio | ) |
Construct as copy.
Definition at line 66 of file regIOobject.C.
regIOobject | ( | const regIOobject & | rio, |
bool | registerCopy | ||
) |
Construct as copy, and transferring registry registration to copy.
if registerCopy is true
Definition at line 81 of file regIOobject.C.
References regIOobject::checkIn(), and regIOobject::checkOut().
|
virtual |
Definition at line 101 of file regIOobject.C.
References Foam::endl(), Foam::Info, Foam::name(), and Foam::type().
TypeName | ( | "regIOobject" | ) |
Runtime type information.
bool checkIn | ( | ) |
Add object to registry.
Definition at line 128 of file regIOobject.C.
References Foam::abort(), polyMesh::defaultRegion, Foam::endl(), Foam::FatalError, FatalErrorIn, Foam::name(), and WarningIn.
Referenced by regIOobject::regIOobject().
bool checkOut | ( | ) |
Remove object from registry.
Definition at line 163 of file regIOobject.C.
Referenced by MeshObject< Mesh, Type >::Delete(), regIOobject::regIOobject(), and objectRegistry::~objectRegistry().
|
inline |
Is this object owned by the registry?
Definition at line 28 of file regIOobjectI.H.
Referenced by objectRegistry::checkOut().
|
inline |
Transfer ownership of this object to its registry.
Definition at line 34 of file regIOobjectI.H.
Referenced by coordinateSystems::New(), and triSurfaceMesh::setField().
|
inlinestatic |
Transfer ownership of the given object pointer to its registry.
and return reference to object.
Definition at line 41 of file regIOobjectI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
|
inlinestatic |
Transfer ownership of the given object pointer to its registry.
and return reference to object.
Definition at line 57 of file regIOobjectI.H.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and autoPtr< T >::ptr().
|
inline |
Release ownership of this object from its registry.
Definition at line 76 of file regIOobjectI.H.
|
inline |
Event number at last update.
Definition at line 82 of file regIOobjectI.H.
Referenced by objectRegistry::getEvent().
|
inline |
Event number at last update.
Definition at line 87 of file regIOobjectI.H.
bool upToDate | ( | const word & | a | ) | const |
Am I uptodate with respect to other regIOobjects.
Definition at line 175 of file regIOobject.C.
Definition at line 188 of file regIOobject.C.
Definition at line 206 of file regIOobject.C.
Definition at line 229 of file regIOobject.C.
void setUpToDate | ( | ) |
Flag me as up to date.
Definition at line 254 of file regIOobject.C.
|
virtual |
Rename.
Reimplemented from IOobject.
Reimplemented in objectRegistry.
Definition at line 261 of file regIOobject.C.
References IOobject::rename().
Referenced by reuseTmpDimensionedField< TypeR, TypeR, GeoMesh >::New(), reuseTmpGeometricField< TypeR, TypeR, PatchField, GeoMesh >::New(), reuseTmpTmpDimensionedField< TypeR, Type1, Type12, TypeR, GeoMesh >::New(), reuseTmpTmpGeometricField< TypeR, Type1, Type12, TypeR, PatchField, GeoMesh >::New(), reuseTmpTmpDimensionedField< TypeR, TypeR, TypeR, Type2, GeoMesh >::New(), reuseTmpTmpGeometricField< TypeR, TypeR, TypeR, Type2, PatchField, GeoMesh >::New(), reuseTmpTmpDimensionedField< TypeR, TypeR, TypeR, TypeR, GeoMesh >::New(), reuseTmpTmpGeometricField< TypeR, TypeR, TypeR, TypeR, PatchField, GeoMesh >::New(), and objectRegistry::rename().
Foam::Istream & readStream | ( | const word & | expectName | ) |
Return Istream and check object type against that given.
Definition at line 84 of file regIOobjectRead.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, Foam::Info, and Foam::name().
Referenced by featureEdgeMesh::featureEdgeMesh(), fieldDictionary::fieldDictionary(), IOdictionary::IOdictionary(), IOField< Type >::IOField(), IOList< T >::IOList(), IOMap< T >::IOMap(), IOPtrList< T >::IOPtrList(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), refinementHistory::refinementHistory(), and topoSet::topoSet().
void close | ( | ) |
Close Istream.
Definition at line 121 of file regIOobjectRead.C.
References Foam::endl(), and Foam::Info.
Referenced by featureEdgeMesh::featureEdgeMesh(), fieldDictionary::fieldDictionary(), IOdictionary::IOdictionary(), IOField< Type >::IOField(), IOList< T >::IOList(), IOMap< T >::IOMap(), IOPtrList< T >::IOPtrList(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), refinementHistory::refinementHistory(), and topoSet::topoSet().
|
virtual |
Virtual readData function.
Must be defined in derived types for which re-reading is required
Reimplemented in refinementHistory, porousZones, TimeActivatedExplicitSourceList< Type >, IOdictionary, and featureEdgeMesh.
Definition at line 138 of file regIOobjectRead.C.
|
virtual |
Read object.
Reimplemented in RASModel, incompressible::RASModel, Time, kOmegaSST, kOmegaSST, multiphaseMixture, LESModel, kOmegaSSTSAS, incompressible::LESModel, basicThermo, SpalartAllmaras, engineTime, LaunderGibsonRSTM, threePhaseMixture, realizableKE, LRR, kOmega, LienCubicKELowRe, LaunderGibsonRSTM, SpalartAllmaras, SpalartAllmaras, PDRkEpsilon, LaunderSharmaKE, realizableKE, RNGkEpsilon, SpalartAllmaras, LRR, kEpsilon, qZeta, LaunderSharmaKE, fvDOM, locDynOneEqEddy, NonlinearKEShih, radiationModel, RNGkEpsilon, LienCubicKE, phaseChangeTwoPhaseMixture, twoPhaseMixture, ePsiThermo< MixtureType >, hPsiThermo< MixtureType >, hsPsiThermo< MixtureType >, hRhoThermo< MixtureType >, hsRhoThermo< MixtureType >, hhuMixtureThermo< MixtureType >, LienLeschzinerLowRe, kEpsilon, GenSGSStress, GenEddyVisc, LamBremhorstKE, SRFModel, homogeneousDynSmagorinsky, dynOneEqEddy, mixedSmagorinsky, fvSchemes, oneEqEddy, dynOneEqEddy, GenSGSStress, hsRhoMixtureThermo< MixtureType >, hPsiMixtureThermo< MixtureType >, hsPsiMixtureThermo< MixtureType >, hRhoMixtureThermo< MixtureType >, DeardorffDiffStress, oneEqEddy, Smagorinsky, SpalartAllmarasIDDES, SchnerrSauer, DeardorffDiffStress, LRRDiffStress, lowReOneEqEddy, GenEddyVisc, spectEddyVisc, Kunz, scaleSimilarity, laminar, Smagorinsky2, Merkle, Smagorinsky, laminar, P1, solution, laminar, singlePhaseTransportModel, IOOutputFilter< OutputFilter >, rpm, tolerances, transportModel, noRadiation, and IObasicSourceList.
Definition at line 144 of file regIOobjectRead.C.
References Foam::type().
Referenced by IOPtrList< T >::IOPtrList(), IObasicSourceList::read(), tolerances::read(), singlePhaseTransportModel::read(), solution::read(), fvSchemes::read(), SRFModel::read(), radiationModel::read(), basicThermo::read(), incompressible::LESModel::read(), LESModel::read(), incompressible::RASModel::read(), and RASModel::read().
|
virtual |
Return true if the object's file has been modified.
Reimplemented in objectRegistry.
Definition at line 152 of file regIOobjectRead.C.
References Foam::lastModified().
|
virtual |
Read object if modified.
Reimplemented in objectRegistry.
Definition at line 162 of file regIOobjectRead.C.
References Foam::endl(), Foam::Info, Foam::lastModified(), Foam::name(), Foam::nl, Pstream::parRun(), Foam::reduce(), and WarningIn.
|
pure virtual |
Pure virtual writaData function.
Must be defined in derived types
Implemented in GeometricField< Type, PatchField, GeoMesh >, GeometricField< symmTensor, fvPatchField, volMesh >, GeometricField< tensor, fvPatchField, volMesh >, GeometricField< scalar, fvPatchField, volMesh >, GeometricField< scalar, fvsPatchField, surfaceMesh >, GeometricField< Type, fvsPatchField, surfaceMesh >, GeometricField< Type, pointPatchField, pointMesh >, GeometricField< scalar, pointPatchField, pointMesh >, GeometricField< vector, fvPatchField, volMesh >, GeometricField< vector, pointPatchField, pointMesh >, GeometricField< Type, fvPatchField, volMesh >, refinementHistory, topoSet, DimensionedField< Type, GeoMesh >, DimensionedField< tensor, volMesh >, DimensionedField< scalar, volMesh >, DimensionedField< vector, pointMesh >, DimensionedField< scalar, pointMesh >, DimensionedField< Type, volMesh >, DimensionedField< symmTensor, volMesh >, DimensionedField< scalar, surfaceMesh >, DimensionedField< vector, volMesh >, DimensionedField< Type, surfaceMesh >, DimensionedField< Type, pointMesh >, triSurfaceMesh, searchableSurfaceWithGaps, searchableBox, searchableSurfaceCollection, searchableCylinder, searchablePlate, searchableSphere, searchablePlane, objectRegistry, polyBoundaryMesh, PDRDragModel, ZoneMesh< ZoneType, MeshType >, ZoneMesh< faceZone, polyMesh >, ZoneMesh< pointZone, polyMesh >, ZoneMesh< cellZone, polyMesh >, TimeActivatedExplicitSourceList< Type >, polyTopoChanger, MeshObject< Mesh, Type >, MeshObject< polyMesh, pointMesh >, MeshObject< fvMesh, UpwindFitData< Polynomial > >, MeshObject< fvMesh, CentredFitData< Polynomial > >, MeshObject< fvMesh, skewCorrectionVectors >, MeshObject< fvMesh, centredFECCellToFaceStencilObject >, MeshObject< fvMesh, quadraticFitSnGradData >, MeshObject< fvMesh, centredCFCFaceToCellStencilObject >, MeshObject< fvMesh, upwindFECCellToFaceStencilObject >, MeshObject< fvMesh, pureUpwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCPCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCECCellToFaceStencilObject >, MeshObject< fvMesh, centredCPCCellToFaceStencilObject >, MeshObject< fvMesh, upwindCFCCellToFaceStencilObject >, MeshObject< fvMesh, leastSquaresVectors >, MeshObject< fvMesh, centredCFCCellToFaceStencilObject >, MeshObject< fvMesh, centredCECCellToFaceStencilObject >, MeshObject< fvMesh, extendedLeastSquaresVectors >, MeshObject< fvMesh, FitDataType >, MeshObject< fvMesh, volPointInterpolation >, MeshObject< lduMesh, GAMGAgglomeration >, AverageIOField< Type >, surfacePatchIOList, surfZoneIOList, UniformDimensionedField< Type >, IOdictionary, IOPtrList< T >, IOPtrList< coordinateSystem >, IOPtrList< injector >, IOPtrList< MRFZone >, IOPtrList< porousZone >, IOPtrList< TimeActivatedExplicitSource< Type > >, IOList< T >, IOMap< T >, IOList< label >, IOList< reactingParcelInjectionData >, IOList< reactingMultiphaseParcelInjectionData >, IOList< face >, IOList< kinematicParcelInjectionData >, IOPosition< ParticleType >, IOField< Type >, IOField< vector >, featureEdgeMesh, fieldDictionary, and polyBoundaryMeshEntries.
Referenced by searchableSurfaceWithGaps::writeData().
|
virtual |
Write using given format, version and compression.
Reimplemented in distributedTriSurfaceMesh, Time, Cloud< ParticleType >, Cloud< BasicReactingMultiphaseParcel< ThermoType > >, Cloud< basicThermoParcel >, Cloud< indexedParticle >, Cloud< trackedParticle >, Cloud< ParcelType >, Cloud< parcel >, Cloud< basicKinematicParcel >, Cloud< solidParticle >, Cloud< CoalParcel< ThermoType > >, Cloud< molecule >, Cloud< passiveParticle >, Cloud< dsmcParcel >, Cloud< BasicReactingParcel< ThermoType > >, triSurfaceMesh, dynamicRefineFvMesh, objectRegistry, polyBoundaryMesh, faceZoneSet, pointZoneSet, and cellZoneSet.
Definition at line 37 of file regIOobjectWrite.C.
References Foam::endl(), IOstream::good(), Foam::Info, IOobject::instance(), Foam::lastModified(), Foam::mkDir(), name(), SeriousErrorIn, Foam::system(), and timeName.
Referenced by regIOobject::write(), globalMeshData::write(), cellZoneSet::writeObject(), pointZoneSet::writeObject(), faceZoneSet::writeObject(), and polyBoundaryMesh::writeObject().
|
virtual |
Write using setting from DB.
Reimplemented in fvMesh, IOdictionary, and IOPosition< ParticleType >.
Definition at line 126 of file regIOobjectWrite.C.
References IOstream::currentVersion, IOobject::time(), and regIOobject::writeObject().
Referenced by autoLayerDriver::addLayers(), meshRefinement::baffleAndSplitMesh(), hexRef8::consistentSlowRefinement2(), meshRefinement::dumpRefinementLevel(), for(), meshRefinement::getDuplicateFaces(), if(), Foam::MapConsistentVolFields(), Foam::MapLagrangianFields(), Foam::MapVolFields(), polyMesh::polyMesh(), quadraticFitSnGradData::quadraticFitSnGradData(), autoSnapDriver::scaleMesh(), removeFaces::setRefinement(), hexRef8::setUnrefinement(), autoSnapDriver::smoothDisplacement(), IOdictionary::write(), dsmcFields::write(), writeRegisteredObject::write(), staticPressure::write(), fvMesh::write(), meshRefinement::write(), components::writeComponentFields(), div::writeDivField(), molecule::writeFields(), Particle< ParticleType >::writeFields(), KinematicParcel< ParcelType >::writeFields(), mag::writeMagField(), magGrad::writeMagGradField(), magSqr::writeMagSqrField(), cellZoneSet::writeObject(), pointZoneSet::writeObject(), faceZoneSet::writeObject(), dynamicRefineFvMesh::writeObject(), cellSource::writeValues(), and faceSource::writeValues().
void operator= | ( | const IOobject & | io | ) |
Reimplemented from IOobject.
Definition at line 277 of file regIOobject.C.
References IOobject::operator=().
|
static |
Definition at line 96 of file regIOobject.H.