Defines the attributes of an object for which implicit objectRegistry management is supported, and provides the infrastructure for performing stream I/O. More...
Public Types | |
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... | |
Public Member Functions | |
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) | |
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 |
Return the local objectRegistry. More... | |
const Time & | time () const |
Return time. More... | |
const word & | name () const |
Return name. More... | |
const word & | headerClassName () const |
Return name of the class name read from header. More... | |
word & | headerClassName () |
Return non-constant access to the class name read from header. More... | |
const string & | note () const |
Return the optional note. More... | |
string & | note () |
Return non-constant access to the optional note. More... | |
virtual void | rename (const word &newName) |
Rename. More... | |
bool | registerObject () const |
Should object created with this IOobject be registered? More... | |
bool & | registerObject () |
Should object created with this IOobject be registered? More... | |
bool | globalObject () const |
Is object same for all processors? More... | |
bool & | globalObject () |
Is object same for all processors? More... | |
unsigned | labelByteSize () const |
The label byte-size, possibly read from the header. More... | |
unsigned | scalarByteSize () const |
The scalar byte-size, 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 |
The read option. More... | |
readOption & | readOpt () |
Non-constant access to the read option. More... | |
writeOption | writeOpt () const |
The write option. More... | |
writeOption & | writeOpt () |
Non-constant access to the write option. 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 |
fileName & | instance () |
const fileName & | local () const |
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 | 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... | |
bool | readHeader (Istream &is) |
Read header. More... | |
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. More... | |
bool | writeHeader (Ostream &os, const word &objectType) const |
Write header. Allow override of type. More... | |
bool | good () const |
bool | bad () const |
InfoProxy< IOobject > | info () const |
Return info proxy. More... | |
void | operator= (const IOobject &io) |
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) |
template<class StringType > | |
Foam::word | scopedName (StringType scope, const word &name) |
Static Public Member Functions | |
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... | |
template<class StringType > | |
static word | scopedName (StringType 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, bool noHint=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... | |
Static Public Attributes | |
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... | |
Protected Member Functions | |
void | setBad (const string &s) |
Set the object state to bad. More... | |
Defines the attributes of an object for which implicit objectRegistry management is supported, and provides the infrastructure for performing stream I/O.
An IOobject is constructed with an object name, a class name, an instance path, a reference to a objectRegistry, and parameters determining its storage status.
Define what is done on object construction and explicit reads:
Definition at line 104 of file IOobject.H.
enum objectState : char |
Enumeration defining the valid states of an IOobject.
Enumerator | |
---|---|
GOOD | |
BAD |
Definition at line 111 of file IOobject.H.
enum readOption : char |
Enumeration defining the read options.
Enumerator | |
---|---|
MUST_READ | |
MUST_READ_IF_MODIFIED | |
READ_IF_PRESENT | |
NO_READ |
Definition at line 118 of file IOobject.H.
enum writeOption : char |
Enumeration defining the write options.
Enumerator | |
---|---|
AUTO_WRITE | |
NO_WRITE |
Definition at line 127 of file IOobject.H.
enum fileCheckTypes : char |
Enumeration defining the file checking options.
Enumerator | |
---|---|
timeStamp | |
timeStampMaster | |
inotify | |
inotifyMaster |
Definition at line 134 of file IOobject.H.
|
virtualdefault |
Destructor.
IOobject | ( | const word & | name, |
const fileName & | instance, | ||
const objectRegistry & | registry, | ||
readOption | r = NO_READ , |
||
writeOption | w = NO_WRITE , |
||
bool | registerObject = true |
||
) |
Construct from name, instance, registry, io options.
Definition at line 287 of file IOobject.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and InfoInFunction.
IOobject | ( | const word & | name, |
const fileName & | instance, | ||
const fileName & | local, | ||
const objectRegistry & | registry, | ||
readOption | r = NO_READ , |
||
writeOption | w = NO_WRITE , |
||
bool | registerObject = true , |
||
bool | globalObject = false |
||
) |
Construct from name, instance, local, registry, io options.
Definition at line 321 of file IOobject.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), and InfoInFunction.
IOobject | ( | const fileName & | path, |
const objectRegistry & | registry, | ||
readOption | r = NO_READ , |
||
writeOption | w = NO_WRITE , |
||
bool | registerObject = true , |
||
bool | globalObject = false |
||
) |
Construct from path, registry, io options.
Uses fileNameComponents() to split path into components. A path that starts with a '/' is regarded as a file system path. Paths starting with either './' or '../' are relative to current working directory (and replaced with absolute equivalents). All other paths are considered to be relative to the case.
Definition at line 357 of file IOobject.C.
References Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, InfoInFunction, and path().
IOobject | ( | const IOobject & | io, |
const objectRegistry & | registry | ||
) |
Copy construct, resetting registry.
Definition at line 398 of file IOobject.C.
Copy construct, resetting name.
Definition at line 420 of file IOobject.C.
IOobject | ( | const IOobject & | io, |
readOption | ro, | ||
writeOption | wo | ||
) |
Copy construct, resetting io options.
Definition at line 442 of file IOobject.C.
|
protected |
Set the object state to bad.
Definition at line 537 of file IOobject.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, InfoInFunction, messageStream::level, and s.
TypeName | ( | "IOobject" | ) |
Declare type-name, virtual type (with debug switch)
|
static |
Split path into instance, local, name components.
The splitting behaviour is as follows:
input | instance | local | name ----------- | ---------- | ----- | ---- a | | | a a/b | a | | b a/b/c/d | a | b/c | d /a/b/c | /a/b | | c ./a/b/c | PWD/a/b | | c ../a/b/c | PWD/../a/b | | c a/b/ | ERROR | |
where PWD is the Foam::cwd() current working directory
Definition at line 123 of file IOobject.C.
References fileName::clean(), Foam::cwd(), Foam::endl(), Foam::isDir(), Foam::name(), path(), validate(), and WarningInFunction.
Create dot-delimited name.group string.
An empty group is ignored.
Referenced by phaseSystem::addField(), phaseChange::addToDriftRate(), alphatPhaseChangeJayatillekeWallFunctionFvPatchScalarField::calcAlphat(), nutkFilmWallFunctionFvPatchScalarField::calcNut(), nutkWallFunctionFvPatchScalarField::calcNut(), nutUWallFunctionFvPatchScalarField::calcNut(), nutUTabulatedWallFunctionFvPatchScalarField::calcNut(), nutkRoughWallFunctionFvPatchScalarField::calcNut(), nutUBlendedWallFunctionFvPatchScalarField::calcNut(), nutUSpaldingWallFunctionFvPatchScalarField::calcNut(), atmNutUWallFunctionFvPatchScalarField::calcNut(), atmNutkWallFunctionFvPatchScalarField::calcNut(), atmNutWallFunctionFvPatchScalarField::calcNut(), nutkFilmWallFunctionFvPatchScalarField::calcUTau(), nutUBlendedWallFunctionFvPatchScalarField::calcUTau(), nutUSpaldingWallFunctionFvPatchScalarField::calcUTau(), nutUWallFunctionFvPatchScalarField::calcYPlus(), turbulentDispersionModel::continuousTurbulence(), populationBalanceModel::continuousTurbulence(), powerLaw::correct(), Maxwell< BasicTurbulenceModel >::correct(), DarcyForchheimer::correct(), limitTemperature::correct(), solidification::correct(), Gosman::D(), Burns::D(), Maxwell< BasicTurbulenceModel >::devRhoReff(), phasePressureModel::devRhoReff(), kineticTheoryModel::devRhoReff(), phaseSystem::dmdt(), LESeddyViscosity< BasicTurbulenceModel >::epsilon(), Stokes< BasicTurbulenceModel >::epsilon(), generalizedNewtonian< BasicMomentumTransportModel >::epsilon(), kEqn< BasicTurbulenceModel >::epsilon(), DeardorffDiffStress< BasicTurbulenceModel >::epsilon(), WALE< BasicTurbulenceModel >::epsilon(), Smagorinsky< BasicTurbulenceModel >::epsilon(), dynamicKEqn< BasicTurbulenceModel >::epsilon(), phaseSystem::fillFields(), kOmegaSSTLM< BasicTurbulenceModel >::Flength(), kOmegaSSTLM< BasicTurbulenceModel >::Fonset(), phaseSystem::foundBlendedSubModel(), phaseSystem::foundSubModel(), kOmegaSSTLM< BasicTurbulenceModel >::Fthetat(), phaseSystem::generatePairsAndSubModels(), IDDESDelta::IDDESDelta(), WALE< BasicTurbulenceModel >::k(), Smagorinsky< BasicTurbulenceModel >::k(), Stokes< BasicTurbulenceModel >::k(), generalizedNewtonian< BasicMomentumTransportModel >::k(), continuousGasKEqn< BasicTurbulenceModel >::liquidTurbulence(), continuousGasKEpsilon< BasicTurbulenceModel >::liquidTurbulence(), phaseSystem::lookupBlendedSubModel(), twoPhaseSystem::lookupSubModel(), phaseSystem::lookupSubModel(), Stokes< BasicTurbulenceModel >::nuEff(), generalizedNewtonian< BasicMomentumTransportModel >::nuEff(), continuousGasKEpsilon< BasicTurbulenceModel >::nuEff(), LESModel< BasicTurbulenceModel >::nuEff(), RASModel< EddyDiffusivity< phaseCompressibleTurbulenceModel > >::nuEff(), Stokes< BasicTurbulenceModel >::nut(), generalizedNewtonian< BasicMomentumTransportModel >::nut(), LESeddyViscosity< BasicTurbulenceModel >::omega(), Stokes< BasicTurbulenceModel >::omega(), kEqn< BasicTurbulenceModel >::omega(), DeardorffDiffStress< BasicTurbulenceModel >::omega(), WALE< BasicTurbulenceModel >::omega(), Smagorinsky< BasicTurbulenceModel >::omega(), ShihQuadraticKE::omega(), LamBremhorstKE::omega(), LienLeschziner::omega(), dynamicKEqn< BasicTurbulenceModel >::omega(), SSG< BasicTurbulenceModel >::omega(), LienCubicKE::omega(), qZeta::omega(), realizableKE< BasicTurbulenceModel >::omega(), SpalartAllmaras< BasicTurbulenceModel >::omega(), LRR< BasicTurbulenceModel >::omega(), kEpsilon< EddyDiffusivity< compressible::turbulenceModel > >::omega(), RNGkEpsilon< BasicTurbulenceModel >::omega(), LaunderSharmaKE< BasicTurbulenceModel >::omega(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::omega(), mixtureKEpsilon< BasicTurbulenceModel >::omega(), kEpsilonPhitF< BasicTurbulenceModel >::omega(), phaseForces::phaseForces(), basicThermo::phasePropertyName(), populationBalanceModel::populationBalanceModel(), Stokes< BasicTurbulenceModel >::R(), generalizedNewtonian< BasicMomentumTransportModel >::R(), phasePressureModel::R(), continuousGasKEpsilon< BasicTurbulenceModel >::R(), kineticTheoryModel::R(), BilgerMixtureFraction::read(), sampledSurfaces::read(), kOmegaSSTLM< BasicTurbulenceModel >::ReThetac(), kOmegaSSTLM< BasicTurbulenceModel >::ReThetat0(), continuousGasKEpsilon< BasicTurbulenceModel >::rhoEff(), fixedShearStressFvPatchVectorField::updateCoeffs(), JohnsonJacksonParticleSlipFvPatchVectorField::updateCoeffs(), JohnsonJacksonParticleThetaFvPatchScalarField::updateCoeffs(), totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs(), alphatWallFunctionFvPatchScalarField::updateCoeffs(), convectiveHeatTransferFvPatchScalarField::updateCoeffs(), wallHeatTransferFvPatchScalarField::updateCoeffs(), alphatFilmWallFunctionFvPatchScalarField::updateCoeffs(), turbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs(), alphatJayatillekeWallFunctionFvPatchScalarField::updateCoeffs(), turbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs(), kLowReWallFunctionFvPatchScalarField::updateCoeffs(), atmAlphatkWallFunctionFvPatchScalarField::updateCoeffs(), porousBafflePressureFvPatchField< Type >::updateCoeffs(), epsilonWallFunctionFvPatchScalarField::updateCoeffs(), omegaWallFunctionFvPatchScalarField::updateCoeffs(), alphatWallBoilingWallFunctionFvPatchScalarField::updateCoeffs(), epsilonWallFunctionFvPatchScalarField::updateWeightedCoeffs(), omegaWallFunctionFvPatchScalarField::updateWeightedCoeffs(), nutkFilmWallFunctionFvPatchScalarField::yPlus(), nutLowReWallFunctionFvPatchScalarField::yPlus(), nutkWallFunctionFvPatchScalarField::yPlus(), nutUWallFunctionFvPatchScalarField::yPlus(), nutUTabulatedWallFunctionFvPatchScalarField::yPlus(), nutUBlendedWallFunctionFvPatchScalarField::yPlus(), nutUSpaldingWallFunctionFvPatchScalarField::yPlus(), and nutURoughWallFunctionFvPatchScalarField::yPlus().
|
static |
Return group (extension part of name)
Definition at line 258 of file IOobject.C.
References IOobject::name(), and word::null.
|
static |
Return member (name without the extension)
Definition at line 271 of file IOobject.C.
References Foam::name().
Create scope:name or scope_name string.
An empty scope or name is ignored.
|
static |
Return the IOobject, but also consider an alternative file name.
io | The expected IOobject to use |
altFile | Alternative fileName (ignored if empty). |
ioName | The alternative name for the IOobject when the altFile resolves to a directory. |
Definition at line 214 of file IOobject.C.
References IOobject::db(), string::expand(), IOobject::globalObject(), Foam::isDir(), IOobject::name(), IOobject::readOpt(), IOobject::registerObject(), and IOobject::writeOpt().
Referenced by decompositionModel::selectIO().
Clone.
Definition at line 351 of file IOobject.H.
References autoPtr< T >::New().
Referenced by searchableSurface::iNew::operator()(), polyMesh::readUpdate(), and searchableSurfaces::searchableSurfaces().
|
inline |
Clone resetting registry.
Definition at line 357 of file IOobject.H.
References autoPtr< T >::New().
const Foam::objectRegistry & db | ( | ) | const |
Return the local objectRegistry.
Definition at line 457 of file IOobject.C.
Referenced by refinementHistory::add(), refinementHistory::apply(), SprayParcel< ParcelType >::calcAtomization(), faePatchField< Type >::db(), faPatchField< Type >::db(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), hexRef8Data::hexRef8Data(), Foam::loadPointField(), masterUncollatedFileOperation::localObjectPath(), voxelMeshSearch::makeMesh(), simplifiedDynamicFvMeshBase::New(), engineMesh::New(), dynamicFvMesh::New(), fvMeshTools::newMesh(), lumpedPointDisplacementPointPatchVectorField::points0(), fileOperation::processorsPath(), Foam::readFields(), Foam::readUniformFields(), regionProperties::regionProperties(), searchableSurfaceCollection::searchableSurfaceCollection(), searchableSurfaceWithGaps::searchableSurfaceWithGaps(), IOobject::selectIO(), motionSmootherAlgo::setDisplacement(), surfMesh::surfMesh(), hexRef8Data::sync(), MPPICParcel< ParcelType >::trackingData::updateAverages(), KinematicParcel< ParcelType >::trackingData::updateAverages(), and PDRblock::writeBlockMeshDict().
const Foam::Time & time | ( | ) | const |
Return time.
Definition at line 463 of file IOobject.C.
References objectRegistry::time().
Referenced by fixedTemperatureConstraint::constrain(), distributedTriSurfaceMesh::distribute(), masterUncollatedFileOperation::exists(), masterUncollatedFileOperation::filePath(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), codeStream::libs(), masterUncollatedFileOperation::localObjectPath(), simplifiedDynamicFvMeshBase::New(), engineMesh::New(), dynamicFvMesh::New(), fvMeshTools::newMesh(), collatedFileOperation::objectPath(), fileOperation::processorsCasePath(), pointFieldReconstructor::reconstructField(), sixDoFRigidBodyMotionSolver::solve(), uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs(), regIOobject::write(), collatedFileOperation::writeObject(), triSurfaceMesh::writeObject(), and masterUncollatedFileOperation::writeObject().
|
inline |
Return name.
Definition at line 70 of file IOobjectI.H.
Referenced by IOobjectList::add(), snappyLayerDriver::addLayers(), exprResultGlobals::addValue(), collatedFileOperation::appendObject(), setsToFaceZone::applyToSet(), attachPolyTopoChanger::attach(), meshRefinement::balance(), mappedPatchBase::calcMapping(), faBoundaryMesh::checkDefinition(), polyBoundaryMesh::checkDefinition(), objectRegistry::checkIn(), objectRegistry::checkOut(), polyBoundaryMesh::checkParallelSync(), faceZone::checkParallelSync(), refinementFeatures::checkSizes(), objectRegistry::classesImpl(), meshObject::clear(), objectRegistry::clear(), meshObject::clearUpto(), wallBoiling::correct(), IOobjectList::countImpl(), objectRegistry::countImpl(), IOobjectList::countTypeImpl(), objectRegistry::countTypeImpl(), fvMeshTools::createDummyFvMeshFiles(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), removeRegisteredObject::execute(), fileOperation::exists(), masterUncollatedFileOperation::exists(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), localPointRegion::findDuplicateFacePairs(), refinementSurfaces::findInside(), fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), coupleGroupIdentifier::findOtherPatchID(), GeometricField< Type, fvPatchField, volMesh >::GeometricField(), exprResultGlobals::get(), exprResultGlobals::getNamespace(), IOobject::group(), polyBoundaryMesh::groupPatchIDs(), hexRef8Data::hexRef8Data(), injectionModelList::info(), transferModelList::info(), dynamicRefineFvMesh::init(), readFields::loadAndStore(), Foam::loadPointField(), masterUncollatedFileOperation::localObjectPath(), objectRegistry::lookupClass(), mappedPatchBase::lookupMesh(), objectRegistry::lookupObjectPtr(), objectRegistry::lookupObjectRefPtr(), voxelMeshSearch::makeMesh(), Foam::MapConsistentSubMesh(), meshObject::movePoints(), baseIOdictionary::name(), objectRegistry::namesImpl(), objectRegistry::namesTypeImpl(), simplifiedDynamicFvMeshBase::New(), dynamicFvMesh::New(), fvMeshTools::newMesh(), sampledPatch::patchIDs(), patchInjection::patchInjection(), PatchPostProcessing< CloudType >::PatchPostProcessing(), pointConstraints::pointConstraints(), pointMesh::pointMesh(), rawIOField< Type >::rawIOField(), wallHeatFlux::read(), wallShearStress::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), IOobject::readHeader(), uncollatedFileOperation::readStream(), masterUncollatedFileOperation::readStream(), polyMesh::readUpdate(), pointFieldReconstructor::reconstructField(), fvFieldReconstructor::reconstructFvSurfaceField(), fvFieldReconstructor::reconstructFvVolumeField(), fvFieldReconstructor::reconstructFvVolumeInternalField(), triSurfaceMesh::regions(), IOobjectList::remove(), exprResultGlobals::removeValue(), Time::run(), IOobject::selectIO(), refinementSurfaces::setMinLevelFields(), removeFaces::setRefinement(), surfaceZonesInfo::surfaceZonesInfo(), surfMesh::surfMesh(), hexRef8Data::sync(), triSurfaceMesh::triSurfaceMesh(), MPPICParcel< ParcelType >::trackingData::updateAverages(), KinematicParcel< ParcelType >::trackingData::updateAverages(), mappedFlowRateFvPatchVectorField::updateCoeffs(), filmPyrolysisRadiativeCoupledMixedFvPatchScalarField::updateCoeffs(), turbulentTemperatureRadCoupledMixedFvPatchScalarField::updateCoeffs(), humidityTemperatureCoupledMixedFvPatchScalarField::updateCoeffs(), topoBitSet::updateLabels(), topoBoolSet::updateLabels(), topoSet::updateLabels(), meshObject::updateMesh(), motionSmootherAlgo::updateMesh(), IOobject::warnNoRereading(), writeObjects::write(), MeshedSurfaceProxy< Face >::write(), ObukhovLength::write(), PDRblock::writeBlockMeshDict(), meshToMeshMethod::writeConnectivity(), boundaryRegion::writeDict(), cellTable::writeDict(), mappedPatchBase::writeDict(), fieldExtents::writeFileHeader(), collatedFileOperation::writeObject(), and regionFunctionObject::writeObject().
|
inline |
Return name of the class name read from header.
Definition at line 88 of file IOobjectI.H.
Referenced by fieldToCell::applyToSet(), IOobjectList::classesImpl(), IOobjectList::countImpl(), fvExprDriver::evaluateVariable(), readFields::execute(), masterUncollatedFileOperation::filePathInfo(), fvExprDriver::foundField(), fvExprDriver::getTopoSetLabels(), readFields::loadAndStore(), Foam::loadPointField(), masterUncollatedFileOperation::localObjectPath(), IOobjectList::lookupClassImpl(), IOobjectList::namesImpl(), polyMesh::polyMesh(), uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), uncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readHeader(), uncollatedFileOperation::readStream(), masterUncollatedFileOperation::readStream(), polyMesh::readUpdate(), fvExprDriver::topoSetType(), and decomposedBlockData::writeData().
|
inline |
Return non-constant access to the class name read from header.
Definition at line 94 of file IOobjectI.H.
|
inline |
Return the optional note.
Definition at line 100 of file IOobjectI.H.
Referenced by uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlocks(), masterUncollatedFileOperation::readHeader(), edgeMeshFormat::write(), decomposedBlockData::writeData(), boundaryRegion::writeDict(), and cellTable::writeDict().
|
inline |
Return non-constant access to the optional note.
Definition at line 106 of file IOobjectI.H.
|
inlinevirtual |
Rename.
Reimplemented in objectRegistry, and regIOobject.
Definition at line 389 of file IOobject.H.
Referenced by nearWallFields::createFields(), searchableCone::findLine(), searchableCone::findLineAll(), searchableCone::findLineAny(), dynamicMotionSolverListFvMesh::init(), points0MotionSolver::points0IO(), decomposedBlockData::readBlocks(), and regIOobject::rename().
|
inline |
Should object created with this IOobject be registered?
Definition at line 112 of file IOobjectI.H.
Referenced by Foam::loadPointField(), regIOobject::regIOobject(), IOobject::selectIO(), and motionSolver::stealRegistration().
|
inline |
Should object created with this IOobject be registered?
Definition at line 118 of file IOobjectI.H.
|
inline |
Is object same for all processors?
Definition at line 124 of file IOobjectI.H.
Referenced by codeStream::doingMasterOnlyReading(), uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), and IOobject::selectIO().
|
inline |
Is object same for all processors?
Definition at line 130 of file IOobjectI.H.
|
inline |
The label byte-size, possibly read from the header.
Definition at line 136 of file IOobjectI.H.
|
inline |
The scalar byte-size, possibly read from the header.
Definition at line 142 of file IOobjectI.H.
Test if headerClassName() equals the given class name.
Definition at line 150 of file IOobjectI.H.
Referenced by IOobjectList::cfindObject(), IOobjectList::countTypeImpl(), IOobjectList::lookupClassTypeImpl(), and IOobjectList::namesTypeImpl().
|
inline |
Test if headerClassName() equals Type::typeName.
Definition at line 157 of file IOobjectI.H.
|
inline |
The read option.
Definition at line 165 of file IOobjectI.H.
Referenced by columnFvMesh::columnFvMesh(), CompactIOField< T, BaseType >::CompactIOField(), CompactIOList< face, label >::CompactIOList(), nearWallFields::createFields(), decomposedBlockData::decomposedBlockData(), extendedFeatureEdgeMesh::extendedFeatureEdgeMesh(), faSchemes::faSchemes(), featureEdgeMesh::featureEdgeMesh(), fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), topoSet::findIOobject(), fvSchemes::fvSchemes(), hexRef8::hexRef8(), dynamicMotionSolverListFvMesh::init(), dynamicMultiMotionSolverFvMesh::init(), IOField< Type >::IOField(), IOList< labelList >::IOList(), IOMap< T >::IOMap(), IOmapDistribute::IOmapDistribute(), IOmapDistributePolyMesh::IOmapDistributePolyMesh(), IOPtrList< Foam::entry >::IOPtrList(), voxelMeshSearch::makeMesh(), fvMeshTools::newMesh(), polyBoundaryMeshEntries::polyBoundaryMeshEntries(), radiativeIntensityRay::radiativeIntensityRay(), rawIOField< Type >::rawIOField(), codedPoints0MotionSolver::redirectMotionSolver(), refinementHistory::refinementHistory(), IOobject::selectIO(), hexRef8Data::sync(), topoSet::topoSet(), triSurfaceMesh::triSurfaceMesh(), IOobject::warnNoRereading(), and Foam::ensightOutput::writeCloudField().
|
inline |
Non-constant access to the read option.
Definition at line 171 of file IOobjectI.H.
|
inline |
The write option.
Definition at line 177 of file IOobjectI.H.
Referenced by nearWallFields::createFields(), dynamicMotionSolverListFvMesh::init(), PDRblock::innerMesh(), objectRegistry::objectRegistry(), IOobject::selectIO(), surfMesh::setWriteOption(), and writeObjects::write().
|
inline |
Non-constant access to the write option.
Definition at line 183 of file IOobjectI.H.
|
inline |
Return group (extension part of name)
Definition at line 76 of file IOobjectI.H.
References word::ext().
|
inline |
Return member (name without the extension)
Definition at line 82 of file IOobjectI.H.
References word::lessExt().
Referenced by kineticGasEvaporation< Thermo, OtherThermo >::Kexp(), and kineticGasEvaporation< Thermo, OtherThermo >::kineticGasEvaporation().
const Foam::fileName & rootPath | ( | ) | const |
Definition at line 469 of file IOobject.C.
Referenced by uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::localObjectPath(), and fileOperation::processorsCasePath().
const Foam::fileName & caseName | ( | ) | const |
Definition at line 475 of file IOobject.C.
Referenced by uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), and masterUncollatedFileOperation::localObjectPath().
|
inline |
Definition at line 191 of file IOobjectI.H.
Referenced by directions::directions(), masterUncollatedFileOperation::exists(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), Time::findInstance(), fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), Foam::loadPointField(), masterUncollatedFileOperation::localObjectPath(), meshRefinement::mergePatchFacesUndo(), triSurfaceMesh::movePoints(), fvMeshTools::newMesh(), collatedFileOperation::objectPath(), points0MotionSolver::points0IO(), Foam::readFields(), Foam::readUniformFields(), surfMesh::surfMesh(), collatedFileOperation::writeObject(), regIOobject::writeObject(), triSurfaceMesh::writeObject(), and distributedTriSurfaceMesh::writeObject().
|
inline |
Definition at line 197 of file IOobjectI.H.
|
inline |
Definition at line 203 of file IOobjectI.H.
Referenced by masterUncollatedFileOperation::dirPath(), masterUncollatedFileOperation::filePath(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), Foam::loadPointField(), masterUncollatedFileOperation::localObjectPath(), fileOperation::processorsPath(), Foam::readFields(), Foam::readUniformFields(), surfMesh::surfMesh(), and PDRblock::writeBlockMeshDict().
Foam::fileName path | ( | ) | const |
The complete path.
Definition at line 481 of file IOobject.C.
Referenced by searchableSurfaces::checkIntersection(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::localObjectPath(), fileOperation::readObjects(), refinementHistory::removeFiles(), motionSmootherAlgo::setDisplacement(), surfMesh::surfMesh(), collatedFileOperation::writeObject(), and Time::writeObject().
Foam::fileName path | ( | const word & | instance, |
const fileName & | local = fileName::null |
||
) | const |
The complete path with alternative instance and local.
Definition at line 505 of file IOobject.C.
|
inline |
The complete path + object name.
Definition at line 209 of file IOobjectI.H.
References Foam::name(), and path().
Referenced by collatedFileOperation::appendObject(), baseIOdictionary::baseIOdictionary(), surfaceFormatsCore::checkFile(), hexRef8::consistentSlowRefinement2(), uncollatedFileOperation::dirPath(), masterUncollatedFileOperation::dirPath(), fileOperation::exists(), masterUncollatedFileOperation::exists(), uncollatedFileOperation::filePath(), masterUncollatedFileOperation::filePath(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::findInstance(), hexRef8::hexRef8(), mappedPatchFieldBase< scalar >::initRetrieveField(), meshRefinement::mergePatchFacesUndo(), fileOperation::objectPath(), collatedFileOperation::processorsDir(), rawIOField< Type >::rawIOField(), uncollatedFileOperation::read(), masterUncollatedFileOperation::read(), baseIOdictionary::readData(), uncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readHeader(), uncollatedFileOperation::readObjects(), fileOperation::readObjects(), masterUncollatedFileOperation::readObjects(), uncollatedFileOperation::readStream(), masterUncollatedFileOperation::readStream(), mappedPatchFieldBase< scalar >::retrieveField(), hexRef8::setUnrefinement(), mappedPatchFieldBase< scalar >::storeField(), surfZoneIOList::surfZoneIOList(), triSurfaceMesh::triSurfaceMesh(), PDRblock::writeBlockMeshDict(), boundaryRegion::writeDict(), cellTable::writeDict(), collatedFileOperation::writeObject(), triSurfaceMesh::writeObject(), fileOperation::writeObject(), distributedTriSurfaceMesh::writeObject(), and masterUncollatedFileOperation::writeObject().
Foam::fileName localFilePath | ( | const word & | typeName, |
const bool | search = true |
||
) | const |
Helper for filePath that searches locally.
When search is false, simply use the current instance, otherwise search previous instances.
Definition at line 516 of file IOobject.C.
References Foam::fileHandler(), fileOperation::filePath(), and Foam::search().
Referenced by surfaceFormatsCore::checkFile(), distributedTriSurfaceMesh::distributedTriSurfaceMesh(), surfaceFormatsCore::findFile(), triSurfaceMesh::triSurfaceMesh(), and Foam::typeFilePath().
Foam::fileName globalFilePath | ( | const word & | typeName, |
const bool | search = true |
||
) | const |
Helper for filePath that searches up if in parallel.
When search is false, simply use the current instance, otherwise search previous instances.
Definition at line 527 of file IOobject.C.
References Foam::fileHandler(), fileOperation::filePath(), and Foam::search().
Referenced by surfaceFormatsCore::checkFile(), GlobalIOField< vector >::filePath(), extendedFeatureEdgeMesh::filePath(), surfaceFormatsCore::findFile(), triSurfaceMesh::triSurfaceMesh(), Foam::typeFilePath(), and Foam::typeFilePath< IOMap< dictionary > >().
Read header.
Definition at line 35 of file IOobjectReadHeader.C.
References IOobject::BAD, Foam::expressions::patchExpr::debug, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, IOstreamOption::format(), dictionary::get(), IOobject::GOOD, IOstream::good(), Foam::Info, InfoInFunction, IOWarningInFunction, token::isWord(), Foam::foamVersion::labelByteSize(), IOstream::lineNumber(), IOobject::MUST_READ, IOobject::MUST_READ_IF_MODIFIED, IOstream::name(), IOobject::name(), Foam::nl, dictionary::readIfPresent(), Foam::foamVersion::scalarByteSize(), SeriousIOErrorInFunction, IOstream::setLabelByteSize(), IOstream::setScalarByteSize(), IOstreamOption::version(), token::wordToken(), and IOobject::writeHeader().
Referenced by extendedEdgeMeshFormat::read(), edgeMeshFormat::read(), decomposedBlockData::read(), masterUncollatedFileOperation::read(), decomposedBlockData::readBlock(), decomposedBlockData::readBlocks(), uncollatedFileOperation::readHeader(), masterUncollatedFileOperation::readHeader(), decomposedBlockData::readMasterHeader(), uncollatedFileOperation::readStream(), masterUncollatedFileOperation::readStream(), and decomposedBlockData::writeData().
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.
Optionally checks headerClassName against the type-name. When search is false, simply use the current instance, otherwise search previous instances.
Definition at line 39 of file IOobjectTemplates.C.
References Foam::endl(), Foam::fileHandler(), fileOperation::readHeader(), Foam::search(), and WarningInFunction.
Referenced by fieldToCell::applyToSet(), fvMeshTools::createDummyFvMeshFiles(), fileOperation::exists(), topoSet::findIOobject(), hexRef8::hexRef8(), hexRef8Data::hexRef8Data(), PatchCollisionDensity< CloudType >::PatchCollisionDensity(), points0MotionSolver::points0IO(), Foam::preservePatchTypes(), pyrolysisChemistryModel< CompType, SolidThermo, GasThermo >::pyrolysisChemistryModel(), extendedEdgeMeshFormat::read(), edgeMeshFormat::read(), particle< Type >::readFields(), fieldAverage::restoreWindowFieldsType(), and TDACChemistryModel< CompType, ThermoType >::TDACChemistryModel().
void warnNoRereading | ( | ) | const |
Helper: warn that type does not support re-reading.
Definition at line 88 of file IOobjectTemplates.C.
References Foam::endl(), IOobject::MUST_READ_IF_MODIFIED, IOobject::name(), IOobject::readOpt(), and WarningInFunction.
|
static |
Write the standard OpenFOAM file/dictionary banner.
Optionally without -*- C++ -*- editor hint (eg, for logs)
Definition at line 45 of file IOobjectWriteHeader.C.
References Foam::foamVersion::version.
Referenced by collatedFileOperation::appendObject(), argList::parse(), and decomposedBlockData::writeHeader().
|
static |
Write the standard file section divider.
Definition at line 99 of file IOobjectWriteHeader.C.
Referenced by collatedFileOperation::appendObject(), Foam::listSwitches(), argList::parse(), writeDictionary::write(), and decomposedBlockData::writeHeader().
|
static |
Write the standard end file divider.
Definition at line 109 of file IOobjectWriteHeader.C.
Referenced by collatedFileOperation::appendObject(), MeshedSurfaceProxy< Face >::write(), PDRblock::writeBlockMeshDict(), decomposedBlockData::writeData(), collatedFileOperation::writeObject(), fileOperation::writeObject(), and masterUncollatedFileOperation::writeObject().
Write header.
Definition at line 156 of file IOobjectWriteHeader.C.
References Foam::type(), and Foam::writeHeader().
Referenced by collatedFileOperation::appendObject(), PDRblock::blockMeshDict(), baseIOdictionary::readData(), IOobject::readHeader(), edgeMeshFormat::write(), interpolationLookUpTable< scalar >::write(), MeshedSurfaceProxy< Face >::write(), PDRblock::writeBlockMeshDict(), boundaryRegion::writeDict(), cellTable::writeDict(), decomposedBlockData::writeObject(), collatedFileOperation::writeObject(), fileOperation::writeObject(), and masterUncollatedFileOperation::writeObject().
Write header. Allow override of type.
Definition at line 119 of file IOobjectWriteHeader.C.
References IOstreamOption::BINARY, Foam::foamVersion::buildArch, Foam::endl(), IOstreamOption::format(), IOstream::good(), IOstream::info(), InfoInFunction, Foam::name(), Foam::nl, Foam::type(), and IOstreamOption::version().
|
inline |
Definition at line 217 of file IOobjectI.H.
Referenced by topoSet::topoSet().
|
inline |
Definition at line 223 of file IOobjectI.H.
Return info proxy.
Used to print token information to a stream
Definition at line 540 of file IOobject.H.
Referenced by profiling::create(), searchableSurfaceWithGaps::findNearest(), searchableSurface::findNearest(), searchableSurfaceWithGaps::getField(), searchableSurfaceWithGaps::getNormal(), searchableSurfaceWithGaps::getRegion(), searchableSurfaceWithGaps::getVolumeType(), waveGenerationModel::info(), irregularWaveModel::info(), solitaryWaveModel::info(), Grimshaw::info(), Boussinesq::info(), McCowan::info(), and KinematicCloud< Cloud< basicKinematicCollidingParcel > >::solve().
void operator= | ( | const IOobject & | io | ) |
Definition at line 558 of file IOobject.C.
Referenced by regIOobject::operator=().
|
inline |
Specialization for void
always returns true (no headerClassName check).
Definition at line 554 of file IOobject.H.
|
inline |
Definition at line 32 of file IOobjectI.H.
References Foam::constant::atomic::group.
|
inline |
Definition at line 48 of file IOobjectI.H.
References Foam::name().
|
static |
Names for the fileCheckTypes.
Definition at line 143 of file IOobject.H.
Referenced by argList::parse().
|
static |
Character for scoping object names (':' or '_')
Change with caution.
Definition at line 208 of file IOobject.H.
|
static |
Type of file modification checking.
Definition at line 211 of file IOobject.H.
Referenced by unwatchedIOdictionary::addWatch(), regIOobject::addWatch(), collatedFileOperation::collatedFileOperation(), fileOperation::lookupAndCacheProcessorsPath(), fileOperation::monitor(), fvMeshTools::newMesh(), argList::parse(), regIOobject::read(), and Time::readModifiedObjects().