OldTimeField< FieldType > Class Template Reference

Class to add into field types to provide old-time storage and retrieval. More...

Inheritance diagram for OldTimeField< FieldType >:

Public Types

typedef OldTimeField< FieldType > OldTime
 The old-time field type. More...
 

Public Member Functions

 OldTimeField (const label timeIndex)
 Construct from a time index. More...
 
 OldTimeField (const OldTimeField< FieldType > &otf)
 Copy construct. More...
 
 OldTimeField (OldTimeField< FieldType > &&otf)
 Move construct. More...
 
 ~OldTimeField ()
 Destructor. More...
 
label timeIndex () const
 Return the time index of the field. More...
 
labeltimeIndex ()
 Return a non-const reference to the time index of the field. More...
 
bool isOldTime () const
 Return whether or not this is an old-time field. More...
 
void storeOldTimes () const
 Store the old-time fields. More...
 
void clearOldTimes ()
 Clear old time fields. More...
 
void nullOldestTime ()
 Set the oldest field pointer to nullObjectPtr. This removes the. More...
 
label nOldTimes (const bool includeNull=true) const
 Return the number of old time fields stored. More...
 
const FieldType & oldTime () const
 Return the old time field. More...
 
FieldType & oldTimeRef ()
 Return a non-const reference to the old time field. More...
 
const FieldType & oldTime (const label n) const
 Return the n-th old time field. More...
 
FieldType & oldTimeRef (const label n)
 Return a non-const reference to the n-th old time field. More...
 
void operator= (const OldTimeField< FieldType > &)=delete
 Disallow default bitwise assignment. More...
 

Protected Member Functions

bool readOldTimeIfPresent ()
 Read old-time field from file if it is present. More...
 
void copyOldTimes (const IOobject &io, const OldTimeField< FieldType > &otf)
 Copy the old times from the given field. More...
 
void copyOldTimes (const word &newName, const OldTimeField< FieldType > &otf)
 Copy the old times from the given field. More...
 

Friends

template<class OtherFieldType >
class OldTimeField
 Declare friendship with other old-time fields. More...
 
template<class OtherFieldType , typename >
struct OldTimeBaseFieldType
 Declare friendship with the base old-time field casting struct. More...
 

Detailed Description

template<class FieldType>
class Foam::OldTimeField< FieldType >

Class to add into field types to provide old-time storage and retrieval.

Source files

Definition at line 92 of file OldTimeField.H.

Member Typedef Documentation

◆ OldTime

typedef OldTimeField<FieldType> OldTime

The old-time field type.

Definition at line 99 of file OldTimeField.H.

Constructor & Destructor Documentation

◆ OldTimeField() [1/3]

OldTimeField ( const label  timeIndex)

Construct from a time index.

Definition at line 188 of file OldTimeField.C.

◆ OldTimeField() [2/3]

OldTimeField ( const OldTimeField< FieldType > &  otf)

Copy construct.

Definition at line 196 of file OldTimeField.C.

◆ OldTimeField() [3/3]

OldTimeField ( OldTimeField< FieldType > &&  otf)

Move construct.

Definition at line 210 of file OldTimeField.C.

◆ ~OldTimeField()

Destructor.

Definition at line 226 of file OldTimeField.C.

References Foam::notNull().

Here is the call graph for this function:

Member Function Documentation

◆ readOldTimeIfPresent()

bool readOldTimeIfPresent
protected

Read old-time field from file if it is present.

Definition at line 125 of file OldTimeField.C.

References typeIOobject< Type >::headerOk(), and Foam::name().

Here is the call graph for this function:

◆ copyOldTimes() [1/2]

void copyOldTimes ( const IOobject io,
const OldTimeField< FieldType > &  otf 
)
protected

Copy the old times from the given field.

Definition at line 160 of file OldTimeField.C.

References IOobject::name().

Here is the call graph for this function:

◆ copyOldTimes() [2/2]

void copyOldTimes ( const word newName,
const OldTimeField< FieldType > &  otf 
)
protected

Copy the old times from the given field.

Definition at line 171 of file OldTimeField.C.

◆ timeIndex() [1/2]

Foam::label timeIndex
inline

Return the time index of the field.

Definition at line 31 of file OldTimeFieldI.H.

Referenced by subCycleField< GeometricField >::~subCycleField().

Here is the caller graph for this function:

◆ timeIndex() [2/2]

Foam::label & timeIndex
inline

Return a non-const reference to the time index of the field.

Definition at line 38 of file OldTimeFieldI.H.

◆ isOldTime()

bool isOldTime

Return whether or not this is an old-time field.

Definition at line 239 of file OldTimeField.C.

◆ storeOldTimes()

void storeOldTimes

Store the old-time fields.

Definition at line 248 of file OldTimeField.C.

References timeIndex.

◆ clearOldTimes()

void clearOldTimes

Clear old time fields.

Definition at line 271 of file OldTimeField.C.

References Foam::notNull().

Referenced by Foam::MeshToMeshMapVolFields().

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

◆ nullOldestTime()

void nullOldestTime

Set the oldest field pointer to nullObjectPtr. This removes the.

field whilst maintaining a tag distinct from nullptr so that the field can be reinstated on the next storeOldTimes.

Definition at line 281 of file OldTimeField.C.

◆ nOldTimes()

Foam::label nOldTimes ( const bool  includeNull = true) const

Return the number of old time fields stored.

Definition at line 291 of file OldTimeField.C.

References Foam::isNull().

Referenced by fvMesh::conform(), and fvMesh::unconform().

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

◆ oldTime() [1/2]

const FieldType & oldTime

Return the old time field.

Definition at line 315 of file OldTimeField.C.

References Foam::isNull(), Foam::name(), IOobject::NO_READ, and IOobject::NO_WRITE.

Referenced by fvMesh::conform(), EulerD2dt2Scheme< Type >::fvcD2dt2(), backwardDdtScheme< Type >::fvcDdt(), CoEulerDdtScheme< Type >::fvcDdt(), CrankNicolsonDdtScheme< Type >::fvcDdt(), EulerDdtScheme< Type >::fvcDdt(), localEulerDdtScheme< Type >::fvcDdt(), SLTSDdtScheme< Type >::fvcDdt(), backwardDdtScheme< Type >::fvcDdtPhiCorr(), CoEulerDdtScheme< Type >::fvcDdtPhiCorr(), CrankNicolsonDdtScheme< Type >::fvcDdtPhiCorr(), EulerDdtScheme< Type >::fvcDdtPhiCorr(), localEulerDdtScheme< Type >::fvcDdtPhiCorr(), SLTSDdtScheme< Type >::fvcDdtPhiCorr(), backwardDdtScheme< Type >::fvcDdtUfCorr(), CoEulerDdtScheme< Type >::fvcDdtUfCorr(), CrankNicolsonDdtScheme< Type >::fvcDdtUfCorr(), EulerDdtScheme< Type >::fvcDdtUfCorr(), localEulerDdtScheme< Type >::fvcDdtUfCorr(), SLTSDdtScheme< Type >::fvcDdtUfCorr(), EulerD2dt2Scheme< Type >::fvmD2dt2(), backwardDdtScheme< Type >::fvmDdt(), CoEulerDdtScheme< Type >::fvmDdt(), CrankNicolsonDdtScheme< Type >::fvmDdt(), EulerDdtScheme< Type >::fvmDdt(), localEulerDdtScheme< Type >::fvmDdt(), SLTSDdtScheme< Type >::fvmDdt(), OldTimeField< FieldType >::oldTimeRef(), chemistryModel< ThermoType >::solve(), fvMesh::unconform(), advectiveFvPatchField< Type >::updateCoeffs(), waveSurfacePressureFvPatchScalarField::updateCoeffs(), and fvMeshStitcher::volumeConservationError().

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

◆ oldTimeRef() [1/2]

FieldType & oldTimeRef

Return a non-const reference to the old time field.

Definition at line 353 of file OldTimeField.C.

References OldTimeField< FieldType >::oldTime().

Here is the call graph for this function:

◆ oldTime() [2/2]

const FieldType & oldTime ( const label  n) const

Return the n-th old time field.

Definition at line 365 of file OldTimeField.C.

References n.

◆ oldTimeRef() [2/2]

FieldType & oldTimeRef ( const label  n)

Return a non-const reference to the n-th old time field.

Definition at line 372 of file OldTimeField.C.

References n.

◆ operator=()

void operator= ( const OldTimeField< FieldType > &  )
delete

Disallow default bitwise assignment.

Friends And Related Function Documentation

◆ OldTimeField

friend class OldTimeField
friend

Declare friendship with other old-time fields.

Definition at line 166 of file OldTimeField.H.

◆ OldTimeBaseFieldType

friend struct OldTimeBaseFieldType
friend

Declare friendship with the base old-time field casting struct.

Definition at line 170 of file OldTimeField.H.


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