optionList Class Reference

List of finite volume options. More...

Inheritance diagram for optionList:
Collaboration diagram for optionList:

Public Member Functions

 TypeName ("optionList")
 Runtime type information. More...
 
 optionList (const fvMesh &mesh)
 Construct null. More...
 
 optionList (const fvMesh &mesh, const dictionary &dict)
 Construct from mesh and dictionary. More...
 
 optionList (const optionList &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~optionList ()
 Destructor. More...
 
void reset (const dictionary &dict)
 Reset the source list. More...
 
bool appliesToField (const word &fieldName) const
 Return whether there is something to apply to the field. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 Return source for equation with specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 Return source for equation with specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 Return source for equation with specified name. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const volScalarField &alpha, const geometricOneField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const geometricOneField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > operator() (const geometricOneField &alpha, const geometricOneField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation. More...
 
template<class Type >
tmp< fvMatrix< Type > > d2dt2 (GeometricField< Type, fvPatchField, volMesh > &field)
 Return source for equation with second time derivative. More...
 
template<class Type >
tmp< fvMatrix< Type > > d2dt2 (GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 Return source for equation with second time derivative. More...
 
template<class Type >
void constrain (fvMatrix< Type > &eqn)
 Apply constraints to equation. More...
 
template<class Type >
void correct (GeometricField< Type, fvPatchField, volMesh > &field)
 Apply correction to field. More...
 
virtual bool read (const dictionary &dict)
 Read dictionary. More...
 
virtual bool writeData (Ostream &os) const
 Write data to Ostream. More...
 
void operator= (const optionList &)=delete
 Disallow default bitwise assignment. More...
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > source (GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const geometricOneField &alpha, const geometricOneField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const volScalarField &alpha, const geometricOneField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > operator() (const geometricOneField &alpha, const volScalarField &rho, GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > d2dt2 (GeometricField< Type, fvPatchField, volMesh > &field)
 
template<class Type >
Foam::tmp< Foam::fvMatrix< Type > > d2dt2 (GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName)
 
- Public Member Functions inherited from PtrList< option >
 PtrList ()
 Null Constructor. More...
 
 PtrList (const label)
 Construct with size specified. More...
 
 PtrList (const PtrList< option > &)
 Copy constructor. More...
 
 PtrList (const PtrList< option > &, const CloneArg &)
 Copy constructor with additional argument for clone. More...
 
 PtrList (PtrList< option > &&)
 Move constructor. More...
 
 PtrList (PtrList< option > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
 PtrList (const SLPtrList< option > &)
 Construct as copy of SLPtrList<T> More...
 
 PtrList (Istream &, const INew &)
 Construct from Istream using given Istream constructor class. More...
 
 PtrList (Istream &)
 Construct from Istream using default Istream constructor class. More...
 
 ~PtrList ()
 Destructor. More...
 
void setSize (const label)
 Reset size of PtrList. If extending the PtrList, new entries are. More...
 
void resize (const label)
 Alias for setSize(const label) More...
 
void clear ()
 Clear the PtrList, i.e. set size to zero deleting all the. More...
 
void append (option *)
 Append an element at the end of the list. More...
 
void append (const autoPtr< option > &)
 
void append (const tmp< option > &)
 
void transfer (PtrList< option > &)
 Transfer the contents of the argument PtrList into this PtrList. More...
 
bool set (const label) const
 Is element set. More...
 
autoPtr< option > set (const label, option *)
 Set element to given T* and return old element (can be nullptr) More...
 
autoPtr< option > set (const label, const autoPtr< option > &)
 Set element to given autoPtr<T> and return old element. More...
 
autoPtr< option > set (const label, const tmp< option > &)
 Set element to given tmp<T> and return old element. More...
 
void reorder (const labelUList &oldToNew)
 Reorders elements. Ordering does not have to be done in. More...
 
void shuffle (const labelUList &newToOld)
 Reorders elements. Ordering does not have to be done in. More...
 
void operator= (const PtrList< option > &)
 Assignment operator. More...
 
void operator= (PtrList< option > &&)
 Move assignment operator. More...
 
- Public Member Functions inherited from UPtrList< T >
 UPtrList ()
 Null Constructor. More...
 
 UPtrList (const label)
 Construct with size specified. More...
 
 UPtrList (UPtrList< T > &, bool reuse)
 Construct as copy or re-use as specified. More...
 
label size () const
 Return the number of elements in the UPtrList. More...
 
bool empty () const
 Return true if the UPtrList is empty (ie, size() is zero) More...
 
Tfirst ()
 Return reference to the first element of the list. More...
 
const Tfirst () const
 Return reference to first element of the list. More...
 
Tlast ()
 Return reference to the last element of the list. More...
 
const Tlast () const
 Return reference to the last element of the list. More...
 
void setSize (const label)
 Reset size of UPtrList. This can only be used to set the size. More...
 
void resize (const label)
 Reset size of UPtrList. This can only be used to set the size. More...
 
void clear ()
 Clear the UPtrList, i.e. set size to zero. More...
 
void transfer (UPtrList< T > &)
 Transfer the contents of the argument UPtrList into this. More...
 
bool set (const label) const
 Is element set. More...
 
Tset (const label, T *)
 Set element. Return old element (can be nullptr). More...
 
void reorder (const labelUList &oldToNew)
 Reorders elements. Ordering does not have to be done in. More...
 
void shuffle (const labelUList &newToOld)
 Reorders elements. Ordering does not have to be done in. More...
 
const Toperator[] (const label) const
 Return element const reference. More...
 
Toperator[] (const label)
 Return element reference. More...
 
const Toperator() (const label) const
 Return element const pointer. More...
 
iterator begin ()
 Return an iterator to begin traversing the UPtrList. More...
 
iterator end ()
 Return an iterator to end traversing the UPtrList. More...
 
const_iterator cbegin () const
 Return an const_iterator to begin traversing the UPtrList. More...
 
const_iterator cend () const
 Return an const_iterator to end traversing the UPtrList. More...
 
const_iterator begin () const
 Return an const_iterator to begin traversing the UPtrList. More...
 
const_iterator end () const
 Return an const_iterator to end traversing the UPtrList. More...
 

Protected Member Functions

const dictionaryoptionsDict (const dictionary &dict) const
 Return the "options" sub-dictionary if present otherwise return dict. More...
 
bool readOptions (const dictionary &dict)
 Read options dictionary. More...
 
void checkApplied () const
 Check that all sources have been applied. More...
 
template<class Type >
tmp< fvMatrix< Type > > source (GeometricField< Type, fvPatchField, volMesh > &field, const word &fieldName, const dimensionSet &ds)
 Return source for equation with specified name and dimensions. More...
 
- Protected Member Functions inherited from PtrList< option >
void read (Istream &, const INew &inewt)
 Read from Istream using given Istream constructor class. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to the mesh database. More...
 
label checkTimeIndex_
 Time index to check that all defined sources have been applied. More...
 

Friends

Ostreamoperator<< (Ostream &os, const optionList &options)
 Ostream operator. More...
 

Additional Inherited Members

- Public Types inherited from UPtrList< T >
typedef T value_type
 Type of values the UPtrList contains. More...
 
typedef Treference
 Type that can be used for storing into UPtrList::value_type objects. More...
 
typedef const Tconst_reference
 Type that can be used for storing into constant UPtrList::value_type. More...
 

Detailed Description

List of finite volume options.

SourceFile optionList.C

Definition at line 64 of file fvOptionList.H.

Constructor & Destructor Documentation

◆ optionList() [1/3]

optionList ( const fvMesh mesh)

Construct null.

Definition at line 98 of file fvOptionList.C.

Referenced by kEpsilonLopesdaCosta< BasicTurbulenceModel >::setPorosityCoefficients().

Here is the caller graph for this function:

◆ optionList() [2/3]

optionList ( const fvMesh mesh,
const dictionary dict 
)

Construct from mesh and dictionary.

Definition at line 88 of file fvOptionList.C.

References optionList::optionsDict(), and optionList::reset().

Here is the call graph for this function:

◆ optionList() [3/3]

optionList ( const optionList )
delete

Disallow default bitwise copy construction.

◆ ~optionList()

virtual ~optionList ( )
inlinevirtual

Destructor.

Definition at line 119 of file fvOptionList.H.

References alpha(), constrain(), correct, Foam::fvc::d2dt2(), dict, Foam::read(), rho, and writeData().

Here is the call graph for this function:

Member Function Documentation

◆ optionsDict()

const Foam::dictionary & optionsDict ( const dictionary dict) const
protected

Return the "options" sub-dictionary if present otherwise return dict.

Definition at line 43 of file fvOptionList.C.

References dict, dictionary::found(), and dictionary::subDict().

Referenced by optionList::optionList(), and optionList::read().

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

◆ readOptions()

bool readOptions ( const dictionary dict)
protected

Read options dictionary.

Definition at line 58 of file fvOptionList.C.

References forAll, option::name(), option::read(), and dictionary::subDict().

Referenced by optionList::read().

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

◆ checkApplied()

void checkApplied ( ) const
protected

Check that all sources have been applied.

Definition at line 73 of file fvOptionList.C.

References option::checkApplied(), and forAll.

Referenced by optionList::constrain().

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

◆ source() [1/2]

tmp<fvMatrix<Type> > source ( GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName,
const dimensionSet ds 
)
protected

Return source for equation with specified name and dimensions.

Referenced by optionList::appliesToField(), optionList::constrain(), and optionList::correct().

Here is the caller graph for this function:

◆ TypeName()

TypeName ( "optionList"  )

Runtime type information.

◆ reset()

void reset ( const dictionary dict)

Reset the source list.

Definition at line 108 of file fvOptionList.C.

References forAllConstIter(), optionList::mesh_, Foam::name(), option::New(), and PtrList< option >::setSize().

Referenced by optionList::optionList().

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

◆ appliesToField()

bool appliesToField ( const word fieldName) const

Return whether there is something to apply to the field.

Definition at line 139 of file fvOptionList.C.

References option::applyToField(), forAll, UPtrList< T >::operator[](), and optionList::source().

Here is the call graph for this function:

◆ operator()() [1/18]

tmp<fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  field)

Return source for equation.

◆ operator()() [2/18]

tmp<fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
)

Return source for equation with specified name.

◆ operator()() [3/18]

tmp<fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Return source for equation.

◆ operator()() [4/18]

tmp<fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
)

Return source for equation with specified name.

◆ operator()() [5/18]

tmp<fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Return source for equation.

◆ operator()() [6/18]

tmp<fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
)

Return source for equation with specified name.

◆ operator()() [7/18]

tmp<fvMatrix<Type> > operator() ( const volScalarField alpha,
const geometricOneField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Return source for equation.

◆ operator()() [8/18]

tmp<fvMatrix<Type> > operator() ( const geometricOneField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Return source for equation.

◆ operator()() [9/18]

tmp<fvMatrix<Type> > operator() ( const geometricOneField alpha,
const geometricOneField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Return source for equation.

◆ d2dt2() [1/4]

tmp<fvMatrix<Type> > d2dt2 ( GeometricField< Type, fvPatchField, volMesh > &  field)

Return source for equation with second time derivative.

Referenced by optionList::d2dt2(), and optionList::operator()().

Here is the caller graph for this function:

◆ d2dt2() [2/4]

tmp<fvMatrix<Type> > d2dt2 ( GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
)

Return source for equation with second time derivative.

◆ constrain()

void constrain ( fvMatrix< Type > &  eqn)

◆ correct()

void correct ( GeometricField< Type, fvPatchField, volMesh > &  field)

Apply correction to field.

Definition at line 308 of file fvOptionListTemplates.C.

References option::applyToField(), option::correct(), Foam::endl(), forAll, Foam::Info, option::isActive(), option::name(), IOobject::name(), UPtrList< T >::operator[](), option::setApplied(), and optionList::source().

Referenced by optionList::constrain(), DeardorffDiffStress< BasicTurbulenceModel >::correct(), dynamicLagrangian< BasicTurbulenceModel >::correct(), Maxwell< BasicTurbulenceModel >::correct(), kEqn< BasicTurbulenceModel >::correct(), kOmega< BasicTurbulenceModel >::correct(), dynamicKEqn< BasicTurbulenceModel >::correct(), kEpsilon< EddyDiffusivity< compressible::turbulenceModel > >::correct(), LaunderSharmaKE< BasicTurbulenceModel >::correct(), RNGkEpsilon< BasicTurbulenceModel >::correct(), SSG< BasicTurbulenceModel >::correct(), realizableKE< BasicTurbulenceModel >::correct(), SpalartAllmaras< BasicTurbulenceModel >::correct(), SpalartAllmarasDES< BasicTurbulenceModel >::correct(), LRR< BasicTurbulenceModel >::correct(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::correct(), mixtureKEpsilon< BasicTurbulenceModel >::correct(), v2f< BasicTurbulenceModel >::correct(), kOmegaSST< LESeddyViscosity< BasicTurbulenceModel >, BasicTurbulenceModel >::correct(), dynamicLagrangian< BasicTurbulenceModel >::correctNut(), kEqn< BasicTurbulenceModel >::correctNut(), WALE< BasicTurbulenceModel >::correctNut(), continuousGasKEpsilon< BasicTurbulenceModel >::correctNut(), kOmega< BasicTurbulenceModel >::correctNut(), DeardorffDiffStress< BasicTurbulenceModel >::correctNut(), SmagorinskyZhang< BasicTurbulenceModel >::correctNut(), Smagorinsky< BasicTurbulenceModel >::correctNut(), NicenoKEqn< BasicTurbulenceModel >::correctNut(), kEpsilon< EddyDiffusivity< compressible::turbulenceModel > >::correctNut(), realizableKE< BasicTurbulenceModel >::correctNut(), LaheyKEpsilon< BasicTurbulenceModel >::correctNut(), LaunderSharmaKE< BasicTurbulenceModel >::correctNut(), RNGkEpsilon< BasicTurbulenceModel >::correctNut(), dynamicKEqn< BasicTurbulenceModel >::correctNut(), kEpsilonLopesdaCosta< BasicTurbulenceModel >::correctNut(), SSG< BasicTurbulenceModel >::correctNut(), mixtureKEpsilon< BasicTurbulenceModel >::correctNut(), LRR< BasicTurbulenceModel >::correctNut(), SpalartAllmaras< BasicTurbulenceModel >::correctNut(), SpalartAllmarasDES< BasicTurbulenceModel >::correctNut(), kOmegaSSTSato< BasicTurbulenceModel >::correctNut(), v2f< BasicTurbulenceModel >::correctNut(), kOmegaSST< LESeddyViscosity< BasicTurbulenceModel >, BasicTurbulenceModel >::correctNut(), and kOmegaSSTLM< BasicTurbulenceModel >::correctReThetatGammaInt().

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

◆ read()

bool read ( const dictionary dict)
virtual

Read dictionary.

Definition at line 157 of file fvOptionList.C.

References optionList::optionsDict(), and optionList::readOptions().

Referenced by options::read(), and options::~options().

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

◆ writeData()

bool writeData ( Ostream os) const
virtual

Write data to Ostream.

Definition at line 163 of file fvOptionList.C.

References forAll, IOstream::good(), Foam::nl, and UPtrList< T >::operator[]().

Referenced by Foam::operator<<().

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

◆ operator=()

void operator= ( const optionList )
delete

Disallow default bitwise assignment.

◆ source() [2/2]

Foam::tmp<Foam::fvMatrix<Type> > source ( GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName,
const dimensionSet ds 
)

◆ operator()() [10/18]

Definition at line 70 of file fvOptionListTemplates.C.

References UPtrList< T >::operator.

◆ operator()() [11/18]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
)

Definition at line 80 of file fvOptionListTemplates.C.

References DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimTime, Foam::dimVolume, and UPtrList< T >::operator.

Here is the call graph for this function:

◆ operator()() [12/18]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Definition at line 91 of file fvOptionListTemplates.C.

References IOobject::name(), and UPtrList< T >::operator.

Here is the call graph for this function:

◆ operator()() [13/18]

◆ operator()() [14/18]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Definition at line 147 of file fvOptionListTemplates.C.

References IOobject::name(), and UPtrList< T >::operator.

Here is the call graph for this function:

◆ operator()() [15/18]

◆ operator()() [16/18]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const geometricOneField alpha,
const geometricOneField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Definition at line 206 of file fvOptionListTemplates.C.

References IOobject::name(), and UPtrList< T >::operator.

Here is the call graph for this function:

◆ operator()() [17/18]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const volScalarField alpha,
const geometricOneField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Definition at line 218 of file fvOptionListTemplates.C.

References Foam::dimless, IOobject::name(), and UPtrList< T >::operator.

Here is the call graph for this function:

◆ operator()() [18/18]

Foam::tmp<Foam::fvMatrix<Type> > operator() ( const geometricOneField alpha,
const volScalarField rho,
GeometricField< Type, fvPatchField, volMesh > &  field 
)

Definition at line 245 of file fvOptionListTemplates.C.

References optionList::d2dt2(), and IOobject::name().

Here is the call graph for this function:

◆ d2dt2() [3/4]

Foam::tmp<Foam::fvMatrix<Type> > d2dt2 ( GeometricField< Type, fvPatchField, volMesh > &  field)

Definition at line 257 of file fvOptionListTemplates.C.

References Foam::fvc::d2dt2(), optionList::d2dt2(), and IOobject::name().

Here is the call graph for this function:

◆ d2dt2() [4/4]

Foam::tmp<Foam::fvMatrix<Type> > d2dt2 ( GeometricField< Type, fvPatchField, volMesh > &  field,
const word fieldName 
)

Definition at line 267 of file fvOptionListTemplates.C.

References DimensionedField< Type, GeoMesh >::dimensions(), Foam::dimTime, Foam::dimVolume, and Foam::sqr().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

Ostream& operator<< ( Ostream os,
const optionList options 
)
friend

Ostream operator.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Reference to the mesh database.

Definition at line 73 of file fvOptionList.H.

Referenced by optionList::reset().

◆ checkTimeIndex_

label checkTimeIndex_
protected

Time index to check that all defined sources have been applied.

Definition at line 76 of file fvOptionList.H.


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