ThermoRefPair< ThermoType > Class Template Reference

Class containing a pair of thermo references. Handles down-casting to more specific thermo types by constructing one pair from another (e.g., constructing a multicomponentThermo reference pair from a basicThermo pair). Tracks validity of the references. More...

Inheritance diagram for ThermoRefPair< ThermoType >:

Public Member Functions

 ThermoRefPair (const objectRegistry &db, const Pair< word > &phaseNames)
 Construct from a database and phase names. More...
 
const Pair< bool > & valid () const
 Access the validity flags. More...
 
bool either () const
 Return if either validity flag is set. More...
 
bool both () const
 Return if both validity flags are set. More...
 
const ThermoType & first () const
 Access the first thermo. More...
 
const ThermoType & second () const
 Access the second thermo. More...
 
template<class OtherThermoType >
ThermoRefPair< OtherThermoType > thermos () const
 Cast to a different thermo type, with error checking. More...
 
template<class OtherThermoType >
ThermoRefPair< OtherThermoType > thermos (const Pair< bool > required, const fvModel &model, const word &thermoType) const
 Cast to a different thermo type, with error checking. More...
 
const ThermoType & operator[] (const label i) const
 Access a thermo by index. More...
 
template<class OtherThermoType >
Foam::ThermoRefPair< OtherThermoType > thermos () const
 
template<class OtherThermoType >
Foam::ThermoRefPair< OtherThermoType > thermos (const Pair< bool > required, const fvModel &model, const word &thermoType) const
 

Friends

template<class OtherThermoType >
class ThermoRefPair
 Declare friendship with other thermo reference pairs. More...
 

Detailed Description

template<class ThermoType>
class Foam::ThermoRefPair< ThermoType >

Class containing a pair of thermo references. Handles down-casting to more specific thermo types by constructing one pair from another (e.g., constructing a multicomponentThermo reference pair from a basicThermo pair). Tracks validity of the references.

Definition at line 50 of file ThermoRefPair.H.

Constructor & Destructor Documentation

◆ ThermoRefPair()

ThermoRefPair ( const objectRegistry db,
const Pair< word > &  phaseNames 
)
inline

Construct from a database and phase names.

Definition at line 48 of file ThermoRefPairI.H.

Member Function Documentation

◆ valid()

◆ either()

bool either
inline

Return if either validity flag is set.

Definition at line 90 of file ThermoRefPairI.H.

Referenced by reactionDrivenPhaseChange::reactionDrivenPhaseChange(), and phaseChange::setSpecies().

Here is the caller graph for this function:

◆ both()

bool both
inline

Return if both validity flags are set.

Definition at line 97 of file ThermoRefPairI.H.

Referenced by phaseChange::setSpecies().

Here is the caller graph for this function:

◆ first()

const ThermoType & first
inline

Access the first thermo.

Definition at line 104 of file ThermoRefPairI.H.

Referenced by coefficientPhaseChange::addSup(), homogeneousCondensation::correct(), coefficientPhaseChange::mDot(), homogeneousCondensation::tau(), and homogeneousLiquidPhaseSeparation::tau().

Here is the caller graph for this function:

◆ second()

const ThermoType & second
inline

Access the second thermo.

Definition at line 111 of file ThermoRefPairI.H.

Referenced by homogeneousCondensation::correct(), and homogeneousLiquidPhaseSeparation::correct().

Here is the caller graph for this function:

◆ thermos() [1/4]

ThermoRefPair<OtherThermoType> thermos ( ) const
inline

◆ thermos() [2/4]

ThermoRefPair<OtherThermoType> thermos ( const Pair< bool >  required,
const fvModel model,
const word thermoType 
) const
inline

Cast to a different thermo type, with error checking.

◆ operator[]()

const ThermoType & operator[] ( const label  i) const
inline

Access a thermo by index.

Definition at line 174 of file ThermoRefPairI.H.

References Foam::first(), and Foam::second().

Here is the call graph for this function:

◆ thermos() [3/4]

Foam::ThermoRefPair<OtherThermoType> thermos ( ) const
inline

Definition at line 120 of file ThermoRefPairI.H.

References Foam::first(), Foam::second(), and Foam::blendedInterfacialModel::valid().

Here is the call graph for this function:

◆ thermos() [4/4]

Foam::ThermoRefPair<OtherThermoType> thermos ( const Pair< bool >  required,
const fvModel model,
const word thermoType 
) const
inline

Definition at line 145 of file ThermoRefPairI.H.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, fvModel::name(), and ThermoRefPair< ThermoType >::valid().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ ThermoRefPair

friend class ThermoRefPair
friend

Declare friendship with other thermo reference pairs.

Definition at line 79 of file ThermoRefPair.H.


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