TimePaths Class Reference

Address the time paths without using the Time class. More...

Inheritance diagram for TimePaths:
[legend]

Public Member Functions

 TimePaths (const argList &args, const word &systemName="system", const word &constantName="constant")
 Construct using characteristics given by the argList. More...
 
 TimePaths (const fileName &rootPath, const fileName &caseName, const word &systemName="system", const word &constantName="constant")
 Construct given database name, rootPath and casePath. More...
 
 TimePaths (const bool processorCase, const fileName &rootPath, const bool distributed, const fileName &globalCaseName, const fileName &caseName, const word &systemName="system", const word &constantName="constant")
 Construct given database name, rootPath and casePath. More...
 
bool distributed () const noexcept
 
bool processorCase () const noexcept
 Return true if this is a processor case. More...
 
bool processorCase (const bool isProcessorCase) noexcept
 Set processor case status. Return old one. More...
 
const fileNamerootPath () const
 Return root path. More...
 
const fileNameglobalCaseName () const
 Return global case name. More...
 
const fileNamecaseName () const
 Return case name. More...
 
fileNamecaseName ()
 The case name for modification (use with caution) More...
 
fileName path () const
 Return path for the case. More...
 
fileName globalPath () const
 Return global path for the case. More...
 
fileName relativePath (const fileName &input, const bool caseTag=false) const
 
const wordconstant () const
 Return constant name. More...
 
const wordsystem () const
 Return system name. More...
 
fileName caseConstant () const
 
fileName caseSystem () const
 
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...
 

Static Public Member Functions

static instantList findTimes (const fileName &directory, const word &constantName="constant")
 Search a given directory for valid time directories. More...
 
static label findClosestTimeIndex (const instantList &timeDirs, const scalar t, const word &constantName="constant")
 Search instantList for the time index closest to the specified time. More...
 

Detailed Description

Address the time paths without using the Time class.

Source files

Definition at line 56 of file TimePaths.H.

Constructor & Destructor Documentation

◆ TimePaths() [1/3]

TimePaths ( const argList args,
const word systemName = "system",
const word constantName = "constant" 
)
explicit

Construct using characteristics given by the argList.

Definition at line 69 of file TimePaths.C.

◆ TimePaths() [2/3]

TimePaths ( const fileName rootPath,
const fileName caseName,
const word systemName = "system",
const word constantName = "constant" 
)

Construct given database name, rootPath and casePath.

Definition at line 91 of file TimePaths.C.

◆ TimePaths() [3/3]

TimePaths ( const bool  processorCase,
const fileName rootPath,
const bool  distributed,
const fileName globalCaseName,
const fileName caseName,
const word systemName = "system",
const word constantName = "constant" 
)

Construct given database name, rootPath and casePath.

Definition at line 112 of file TimePaths.C.

Member Function Documentation

◆ distributed()

bool distributed ( ) const
inlinenoexcept

True if case running with parallel distributed directories (ie. not NFS mounted)

Definition at line 30 of file TimePathsI.H.

Referenced by Time::readDict().

Here is the caller graph for this function:

◆ processorCase() [1/2]

bool processorCase ( ) const
inlinenoexcept

Return true if this is a processor case.

Definition at line 36 of file TimePathsI.H.

Referenced by cyclicAMIPolyPatch::canResetAMI(), cyclicAMIFvPatch::coupled(), masterUncollatedFileOperation::exists(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), collatedFileOperation::objectPath(), and collatedFileOperation::writeObject().

Here is the caller graph for this function:

◆ processorCase() [2/2]

bool processorCase ( const bool  isProcessorCase)
inlinenoexcept

Set processor case status. Return old one.

Definition at line 42 of file TimePathsI.H.

◆ rootPath()

const Foam::fileName & rootPath ( ) const
inline

Return root path.

Definition at line 50 of file TimePathsI.H.

Referenced by Time::path().

Here is the caller graph for this function:

◆ globalCaseName()

const Foam::fileName & globalCaseName ( ) const
inline

Return global case name.

Definition at line 56 of file TimePathsI.H.

Referenced by uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::localObjectPath(), and fileOperation::processorsCasePath().

Here is the caller graph for this function:

◆ caseName() [1/2]

const Foam::fileName & caseName ( ) const
inline

Return case name.

Definition at line 62 of file TimePathsI.H.

Referenced by Time::path().

Here is the caller graph for this function:

◆ caseName() [2/2]

Foam::fileName & caseName ( )
inline

The case name for modification (use with caution)

Definition at line 68 of file TimePathsI.H.

◆ path()

Foam::fileName path ( ) const
inline

Return path for the case.

Definition at line 74 of file TimePathsI.H.

◆ globalPath()

Foam::fileName globalPath ( ) const
inline

Return global path for the case.

Definition at line 80 of file TimePathsI.H.

Referenced by CloudFunctionObject< CloudType >::CloudFunctionObject(), meshRefinement::findRegions(), averageNeighbourFvGeometryScheme::movePoints(), objectiveManager::objectiveManager(), abort::read(), and shortestPathSet::shortestPathSet().

Here is the caller graph for this function:

◆ relativePath()

Foam::fileName relativePath ( const fileName input,
const bool  caseTag = false 
) const
inline

Return the input relative to the globalPath by stripping off a leading value of the globalPath

Parameters
inputthe directory or filename to make case-relative
caseTagreplace globalPath with <case> for later use with expand(), or prefix <case> if the file name was not an absolute location

Definition at line 87 of file TimePathsI.H.

References Foam::input().

Referenced by PDRblock::writeBlockMeshDict().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constant()

◆ system()

const Foam::word & system ( ) const
inline

Return system name.

Definition at line 102 of file TimePathsI.H.

Referenced by codedBase::codeDict(), fvMeshTools::createDummyFvMeshFiles(), uncollatedFileOperation::filePathInfo(), masterUncollatedFileOperation::filePathInfo(), optimisationManager::New(), PDRblock::writeBlockMeshDict(), and triSurfaceMesh::writeObject().

Here is the caller graph for this function:

◆ caseConstant()

Foam::fileName caseConstant ( ) const
inline

Return the constant name for the case, which is ../constant() for parallel runs.

Definition at line 108 of file TimePathsI.H.

Referenced by timeVaryingMappedFixedValuePointPatchField< Type >::checkTable(), and triSurfaceMesh::writeObject().

Here is the caller graph for this function:

◆ caseSystem()

Foam::fileName caseSystem ( ) const
inline

Return the system name for the case, which is ../system() for parallel runs.

Definition at line 119 of file TimePathsI.H.

References Foam::system().

Referenced by lumpedPointIOMovement::New(), sensitivitySurface::smoothSensitivities(), and triSurfaceMesh::writeObject().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constantPath()

Foam::fileName constantPath ( ) const
inline

Return constant path.

Definition at line 130 of file TimePathsI.H.

References path().

Here is the call graph for this function:

◆ systemPath()

Foam::fileName systemPath ( ) const
inline

Return system path.

Definition at line 136 of file TimePathsI.H.

References path(), and Foam::system().

Here is the call graph for this function:

◆ findTimes()

Foam::instantList findTimes ( const fileName directory,
const word constantName = "constant" 
)
static

Search a given directory for valid time directories.

Forwards to the current fileHandler

Definition at line 140 of file TimePaths.C.

References Foam::fileHandler(), and fileOperation::findTimes().

Referenced by uniformInterpolatedDisplacementPointPatchVectorField::uniformInterpolatedDisplacementPointPatchVectorField().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findClosestTimeIndex()

Foam::label findClosestTimeIndex ( const instantList timeDirs,
const scalar  t,
const word constantName = "constant" 
)
static

Search instantList for the time index closest to the specified time.

Definition at line 156 of file TimePaths.C.

References Foam::diff(), Foam::mag(), and Foam::name().

Referenced by if(), and timeSelector::selected().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ times()

Foam::instantList times ( ) const

Search the case for valid time directories.

Definition at line 149 of file TimePaths.C.

References path().

Referenced by fileOperation::findInstance(), masterUncollatedFileOperation::findInstance(), timeSelector::select0(), and triSurface::triSurfInstance().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findClosestTime()

Foam::instant findClosestTime ( const scalar  t) const

Search the case for the time closest to the given time.

Definition at line 183 of file TimePaths.C.

References Foam::diff(), Foam::mag(), and path().

Here is the call graph for this function:

The documentation for this class was generated from the following files: