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 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...
 
bool hasStoredOldTimes () const
 Return whether old-time fields have been stored yet. 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 Field0Type & oldTime () const
 Return the old-time field. More...
 
Field0Type & oldTimeRef ()
 Return a non-const reference to the old-time field. More...
 
const Field0Type & oldTime (const label n) const
 Return the n-th old-time field. More...
 
Field0Type & 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...
 
template<template< class > class OtherPrimitiveField>
void copyOldTimes (const IOobject &io, const OtherOldTime< OtherPrimitiveField > &)
 Copy the old-times from the given field. More...
 
template<template< class > class OtherPrimitiveField>
void copyOldTimes (const word &newName, const OtherOldTime< OtherPrimitiveField > &)
 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 112 of file OldTimeField.H.

Constructor & Destructor Documentation

◆ OldTimeField() [1/3]

OldTimeField ( const label  timeIndex)

Construct from a time index.

Definition at line 190 of file OldTimeField.C.

◆ OldTimeField() [2/3]

OldTimeField ( const OldTimeField< FieldType > &  otf)

Copy construct.

Definition at line 198 of file OldTimeField.C.

References Foam::notNull(), and tmp< T >::valid().

Here is the call graph for this function:

◆ OldTimeField() [3/3]

OldTimeField ( OldTimeField< FieldType > &&  otf)

Move construct.

Definition at line 212 of file OldTimeField.C.

◆ ~OldTimeField()

Destructor.

Definition at line 228 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(), mesh, and Foam::name().

Here is the call graph for this function:

◆ copyOldTimes() [1/2]

void copyOldTimes ( const IOobject io,
const OtherOldTime< OtherPrimitiveField > &  otf 
)
protected

Copy the old-times from the given field.

Definition at line 161 of file OldTimeField.C.

References IOobject::name().

Here is the call graph for this function:

◆ copyOldTimes() [2/2]

void copyOldTimes ( const word newName,
const OtherOldTime< OtherPrimitiveField > &  otf 
)
protected

Copy the old-times from the given field.

Definition at line 173 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 241 of file OldTimeField.C.

◆ hasStoredOldTimes()

bool hasStoredOldTimes

Return whether old-time fields have been stored yet.

Definition at line 250 of file OldTimeField.C.

◆ storeOldTimes()

void storeOldTimes

Store the old-time fields.

Definition at line 257 of file OldTimeField.C.

Referenced by LagrangianMesh::reset().

Here is the caller graph for this function:

◆ clearOldTimes()

void clearOldTimes

Clear old-time fields.

Definition at line 276 of file OldTimeField.C.

Referenced by Foam::MeshToMeshMapVolFields(), and LagrangianMesh::reset().

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 287 of file OldTimeField.C.

◆ nOldTimes()

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

Return the number of old-time fields stored.

Definition at line 297 of file OldTimeField.C.

References Foam::isNull().

Referenced by fvMesh::conform(), inhomogeneousEGRMixture< ThermoType >::reset(), and fvMesh::unconform().

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

◆ oldTime() [1/2]

const Foam::OldTimeField< FieldType >::Field0Type & oldTime

Return the old-time field.

Definition at line 322 of file OldTimeField.C.

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

Referenced by turbulentDispersion::calculate(), 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(), ddtScheme< Type >::Lagrangianmddt(), CrankNicolson< Type >::LagrangianmDdt(), ddtScheme< Type >::Lagrangianmddt0(), CrankNicolsonDdtScheme< Type >::meshPhi(), backwardDdtScheme< Type >::meshPhi(), OldTimeField< FieldType >::oldTimeRef(), LagrangianMesh::reset(), inhomogeneousEGRMixture< ThermoType >::reset(), cloud::solve(), chemistryModel< ThermoType >::solve(), LagrangianMesh::track(), 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]

Foam::OldTimeField< FieldType >::Field0Type & oldTimeRef

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

Definition at line 362 of file OldTimeField.C.

References OldTimeField< FieldType >::oldTime().

Referenced by inhomogeneousEGRMixture< ThermoType >::reset().

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

◆ oldTime() [2/2]

const Foam::OldTimeField< FieldType >::Field0Type & oldTime ( const label  n) const

Return the n-th old-time field.

Definition at line 375 of file OldTimeField.C.

References n.

◆ oldTimeRef() [2/2]

Foam::OldTimeField< FieldType >::Field0Type & oldTimeRef ( const label  n)

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

Definition at line 386 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 200 of file OldTimeField.H.

◆ OldTimeBaseFieldType

friend struct OldTimeBaseFieldType
friend

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

Definition at line 204 of file OldTimeField.H.


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