Address the time paths without using the Time class. More...
Public Member Functions | |
TimePaths (const bool processorCase, const fileName &rootPath, const bool distributed, const fileName &globalCaseName, const fileName &caseName, const word &systemDirName="system", const word &constantDirName="constant") | |
Construct from all components. More... | |
TimePaths (const argList &args, const word &systemDirName="system", const word &constantDirName="constant") | |
Construct using characteristics given by the argList. More... | |
TimePaths (const fileName &rootPath, const fileName &caseName, const word &systemDirName="system", const word &constantDirName="constant") | |
Construct from rootPath and casePath. More... | |
bool | distributed () const noexcept |
True if case running with parallel distributed directories (ie. not NFS mounted) More... | |
bool | processorCase () const noexcept |
True if this is a processor case. More... | |
bool | processorCase (bool on) noexcept |
Set processor case status. Return old status. More... | |
const fileName & | rootPath () const noexcept |
Return root path. More... | |
const fileName & | globalCaseName () const noexcept |
Return global case name. More... | |
const fileName & | caseName () const noexcept |
Return case name. More... | |
fileName & | caseName () noexcept |
The case name for modification (use with caution) More... | |
fileName | path () const |
Return path for the case = rootPath/caseName. More... | |
fileName | globalPath () const |
Return global path for the case = rootPath/globalCaseName. More... | |
fileName | relativePath (const fileName &input, const bool caseTag=false) const |
Return the input relative to the globalPath by stripping off a leading value of the globalPath. More... | |
const word & | constant () const noexcept |
Return constant name. More... | |
const word & | system () const noexcept |
Return system name. More... | |
fileName | caseConstant () const |
Return the constant name for the case, which is ../constant() for parallel runs. More... | |
fileName | caseSystem () const |
Return the system name for the case, which is ../system() for parallel runs. More... | |
fileName | constantPath () const |
Return constant path. More... | |
fileName | systemPath () const |
Return system path. More... | |
instantList | times () const |
Search the case for valid time directories. More... | |
instant | findClosestTime (const scalar t) const |
Search the case for the time closest to the given time. More... | |
word | findInstancePath (const instant &t) const |
Search the case for the time directory path corresponding to the given instance. More... | |
Static Public Member Functions | |
static instantList | findTimes (const fileName &directory, const word &constantDirName="constant") |
Search a given directory for valid time directories. More... | |
static label | findClosestTimeIndex (const UList< instant > &timeDirs, const scalar t, const word &constantDirName="constant") |
Search instantList for the time index closest to the specified time. More... | |
static word | findInstancePath (const UList< instant > &timeDirs, const instant &t) |
Search instantList for matching time value, return the instance name or word::null if nothing is equal. More... | |
Address the time paths without using the Time class.
Definition at line 51 of file TimePaths.H.
TimePaths | ( | const bool | processorCase, |
const fileName & | rootPath, | ||
const bool | distributed, | ||
const fileName & | globalCaseName, | ||
const fileName & | caseName, | ||
const word & | systemDirName = "system" , |
||
const word & | constantDirName = "constant" |
||
) |
Construct from all components.
Definition at line 62 of file TimePaths.C.
|
explicit |
Construct using characteristics given by the argList.
Definition at line 87 of file TimePaths.C.
|
inline |
Construct from rootPath and casePath.
Definition at line 24 of file TimePathsI.H.
|
inlinenoexcept |
True if case running with parallel distributed directories (ie. not NFS mounted)
Definition at line 46 of file TimePathsI.H.
Referenced by Time::readDict().
|
inlinenoexcept |
True if this is a processor case.
Definition at line 52 of file TimePathsI.H.
Referenced by cyclicAMIPolyPatch::canResetAMI(), cyclicAMIFvPatch::coupled(), and collatedFileOperation::writeObject().
|
inlinenoexcept |
Set processor case status. Return old status.
Definition at line 58 of file TimePathsI.H.
|
inlinenoexcept |
Return root path.
Definition at line 66 of file TimePathsI.H.
Referenced by Time::globalPath(), and Time::path().
|
inlinenoexcept |
Return global case name.
Definition at line 72 of file TimePathsI.H.
Referenced by Time::globalPath().
|
inlinenoexcept |
Return case name.
Definition at line 78 of file TimePathsI.H.
Referenced by Time::path().
|
inlinenoexcept |
The case name for modification (use with caution)
Definition at line 84 of file TimePathsI.H.
|
inline |
Return path for the case = rootPath/caseName.
Definition at line 90 of file TimePathsI.H.
Referenced by Time::timePath().
|
inline |
Return global path for the case = rootPath/globalCaseName.
Definition at line 96 of file TimePathsI.H.
Referenced by Time::globalTimePath().
|
inline |
Return the input relative to the globalPath by stripping off a leading value of the globalPath.
input | the directory or filename to make case-relative |
caseTag | replace globalPath with <case> for later use with expand(), or prefix <case> if the file name was not an absolute location |
Definition at line 103 of file TimePathsI.H.
References Foam::input().
Referenced by surfaceNoise::initialise(), and PDRblock::writeBlockMeshDict().
|
inlinenoexcept |
Return constant name.
Definition at line 112 of file TimePathsI.H.
Referenced by componentDisplacementMotionSolver::componentDisplacementMotionSolver(), masterUncollatedFileOperation::findInstance(), fileOperation::findInstance(), meshReader::mesh(), motionSolver::New(), basicThermo::New(), laminarFlameSpeed::New(), adjointTurbulenceModel::New(), adjointRASModel::New(), motionSolver::iNew::operator()(), points0MotionSolver::points0IO(), areaWrite::read(), masterUncollatedFileOperation::readObjects(), regionProperties::regionProperties(), timeSelector::select0(), Foam::selectReadIO(), masterUncollatedFileOperation::setTime(), cyclicAMIPolyPatch::surfPtr(), mappedPatchBase::surfPtr(), triSurfaceMeshPointSet::triSurfaceMeshPointSet(), triSurface::triSurfInstance(), velocityDisplacementMotionSolver::velocityDisplacementMotionSolver(), volBSplinesBase::volBSplinesBase(), FIREMeshWriter::write(), triSurfaceTools::writeCurvature(), and triSurfaceMesh::writeObject().
|
inlinenoexcept |
Return system name.
Definition at line 118 of file TimePathsI.H.
Referenced by codedBase::codeDict(), fvMeshTools::createDummyFvMeshFiles(), optimisationManager::New(), PDRblock::writeBlockMeshDict(), and triSurfaceMesh::writeObject().
|
inline |
Return the constant name for the case, which is ../constant() for parallel runs.
Definition at line 124 of file TimePathsI.H.
Referenced by triSurfaceMesh::writeObject().
|
inline |
Return the system name for the case, which is ../system() for parallel runs.
Definition at line 135 of file TimePathsI.H.
References Foam::system().
Referenced by lumpedPointIOMovement::New(), sensitivitySurface::smoothSensitivities(), and triSurfaceMesh::writeObject().
|
inline |
Return constant path.
Definition at line 146 of file TimePathsI.H.
References path().
|
inline |
Return system path.
Definition at line 152 of file TimePathsI.H.
References path(), and Foam::system().
|
static |
Search a given directory for valid time directories.
Forwards to the current fileHandler
Definition at line 109 of file TimePaths.C.
References Foam::fileHandler.
Referenced by uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs().
|
static |
Search instantList for the time index closest to the specified time.
Definition at line 176 of file TimePaths.C.
References Foam::diff(), Foam::mag(), Foam::name(), and UList< T >::size().
Referenced by if(), timeSelector::selected(), and timeSelector::setTimeIfPresent().
|
static |
Search instantList for matching time value, return the instance name or word::null if nothing is equal.
Definition at line 125 of file TimePaths.C.
References Instant< T >::equal(), and forAllReverse.
Referenced by uncollatedFileOperation::readObjects(), and masterUncollatedFileOperation::readObjects().
Foam::instantList times | ( | ) | const |
Search the case for valid time directories.
Definition at line 118 of file TimePaths.C.
References path().
Referenced by masterUncollatedFileOperation::findInstance(), fileOperation::findInstance(), timeSelector::select0(), timeSelector::setTimeIfPresent(), and triSurface::triSurfInstance().
Foam::instant findClosestTime | ( | const scalar | t | ) | const |
Search the case for the time closest to the given time.
Definition at line 203 of file TimePaths.C.
References UList< T >::back(), Foam::diff(), UList< T >::front(), Foam::mag(), path(), and UList< T >::size().
Foam::word findInstancePath | ( | const instant & | t | ) | const |
Search the case for the time directory path corresponding to the given instance.
Definition at line 164 of file TimePaths.C.
References path().