Classes | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
option Class Reference

Finite volume options abtract base class. Provides a base set of controls, e.g. More...

Inheritance diagram for option:
Inheritance graph
[legend]
Collaboration diagram for option:
Collaboration graph
[legend]

Classes

class  iNew
 Return pointer to new fvOption object created. More...
 

Public Member Functions

 TypeName ("option")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, option, dictionary,( const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh ),(name, modelType, dict, mesh))
 
 option (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 Construct from components. More...
 
autoPtr< optionclone () const
 Return clone. More...
 
virtual ~option ()
 Destructor. More...
 
const wordname () const
 Return const access to the source name. More...
 
const fvMeshmesh () const
 Return const access to the mesh database. More...
 
const dictionarycoeffs () const
 Return dictionary. More...
 
bool active () const
 Return const access to the source active flag. More...
 
void setApplied (const label fieldI)
 Set the applied flag to true for field index fieldI. More...
 
Switchactive ()
 Return access to the source active flag. More...
 
virtual bool isActive ()
 Is the source active? More...
 
virtual label applyToField (const word &fieldName) const
 Return index of field name if found in fieldNames list. More...
 
virtual void checkApplied () const
 Check that the source has been applied. More...
 
virtual void addSup (fvMatrix< scalar > &eqn, const label fieldI)
 
virtual void addSup (fvMatrix< vector > &eqn, const label fieldI)
 
virtual void addSup (fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void addSup (fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void addSup (fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< scalar > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< vector > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void addSup (const volScalarField &alpha, const volScalarField &rho, fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< scalar > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< vector > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< sphericalTensor > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< symmTensor > &eqn, const label fieldI)
 
virtual void constrain (fvMatrix< tensor > &eqn, const label fieldI)
 
virtual void correct (volScalarField &field)
 
virtual void correct (volVectorField &field)
 
virtual void correct (volSphericalTensorField &field)
 
virtual void correct (volSymmTensorField &field)
 
virtual void correct (volTensorField &field)
 
virtual void writeHeader (Ostream &) const
 Write the source header information. More...
 
virtual void writeFooter (Ostream &) const
 Write the source footer information. More...
 
virtual void writeData (Ostream &) const
 Write the source properties. More...
 
virtual bool read (const dictionary &dict)
 Read source dictionary. More...
 

Static Public Member Functions

static autoPtr< optionNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 Return a reference to the selected fvOption model. More...
 

Protected Attributes

const word name_
 Source name. More...
 
const word modelType_
 Model type. More...
 
const fvMeshmesh_
 Reference to the mesh database. More...
 
dictionary dict_
 Top level source dictionary. More...
 
dictionary coeffs_
 Dictionary containing source coefficients. More...
 
Switch active_
 Source active flag. More...
 
wordList fieldNames_
 Field names to apply source to - populated by derived models. More...
 
List< bool > applied_
 Applied flag list - corresponds to each fieldNames_ entry. More...
 

Detailed Description

Finite volume options abtract base class. Provides a base set of controls, e.g.

type scalarExplicitSource // source type active on; // on/off switch

Note: On evaluation, source/sink options are to be added to the equation R.H.S.

Source files

Definition at line 65 of file fvOption.H.

Constructor & Destructor Documentation

option ( const word name,
const word modelType,
const dictionary dict,
const fvMesh mesh 
)

Construct from components.

Definition at line 44 of file fvOption.C.

References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), Foam::Info, and option::New().

Here is the call graph for this function:

~option ( )
virtual

Destructor.

Definition at line 96 of file fvOption.C.

Referenced by option::iNew::operator()().

Here is the caller graph for this function:

Member Function Documentation

TypeName ( "option"  )

Runtime type information.

declareRunTimeSelectionTable ( autoPtr  ,
option  ,
dictionary  ,
( const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh ,
(name, modelType, dict, mesh  
)
autoPtr<option> clone ( ) const
inline

Return clone.

Definition at line 131 of file fvOption.H.

References option::iNew::iNew(), and notImplemented.

Here is the call graph for this function:

Foam::autoPtr< Foam::fv::option > New ( const word name,
const dictionary dict,
const fvMesh mesh 
)
static

Return a reference to the selected fvOption model.

Definition at line 67 of file fvOption.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::indent(), Foam::Info, dictionary::lookup(), mesh, Foam::name(), and Foam::nl.

Referenced by option::iNew::operator()(), option::option(), and optionList::reset().

Here is the call graph for this function:

Here is the caller graph for this function:

const Foam::word & name ( ) const
inline

Return const access to the source name.

Definition at line 28 of file fvOptionI.H.

References option::name_.

Referenced by optionList::constrain(), optionList::correct(), optionList::operator()(), option::iNew::operator()(), and optionList::readOptions().

Here is the caller graph for this function:

const Foam::fvMesh & mesh ( ) const
inline

Return const access to the mesh database.

Definition at line 34 of file fvOptionI.H.

References option::mesh_.

Referenced by option::iNew::operator()().

Here is the caller graph for this function:

const Foam::dictionary & coeffs ( ) const
inline

Return dictionary.

Definition at line 40 of file fvOptionI.H.

References option::coeffs_.

Referenced by option::iNew::operator()().

Here is the caller graph for this function:

bool active ( ) const
inline

Return const access to the source active flag.

Definition at line 46 of file fvOptionI.H.

References option::active_.

Referenced by option::iNew::operator()().

Here is the caller graph for this function:

void setApplied ( const label  fieldI)
inline

Set the applied flag to true for field index fieldI.

Definition at line 52 of file fvOptionI.H.

References option::applied_.

Referenced by optionList::constrain(), optionList::correct(), optionList::operator()(), and option::iNew::operator()().

Here is the caller graph for this function:

Foam::Switch & active ( )
inline

Return access to the source active flag.

Definition at line 58 of file fvOptionI.H.

References option::active_.

bool isActive ( )
virtual

Is the source active?

Reimplemented in cellSetOption.

Definition at line 102 of file fvOption.C.

Referenced by optionList::constrain(), optionList::correct(), cellSetOption::isActive(), optionList::operator()(), and option::iNew::operator()().

Here is the caller graph for this function:

Foam::label applyToField ( const word fieldName) const
virtual

Return index of field name if found in fieldNames list.

Definition at line 108 of file fvOption.C.

References Foam::findIndex().

Referenced by optionList::constrain(), optionList::correct(), optionList::operator()(), and option::iNew::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void checkApplied ( ) const
virtual

Check that the source has been applied.

Definition at line 114 of file fvOption.C.

References option::addSup(), Foam::endl(), forAll, and WarningIn.

Referenced by optionList::checkApplied(), and option::iNew::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void addSup ( fvMatrix< scalar > &  eqn,
const label  fieldI 
)
virtual

Reimplemented in solidificationMeltingSource, effectivenessHeatExchangerSource, and interRegionHeatTransferModel.

Definition at line 129 of file fvOption.C.

Referenced by option::addSup(), option::checkApplied(), optionList::operator()(), and option::iNew::operator()().

Here is the caller graph for this function:

void addSup ( fvMatrix< vector > &  eqn,
const label  fieldI 
)
virtual
void addSup ( fvMatrix< symmTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 153 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( fvMatrix< sphericalTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 145 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( fvMatrix< tensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 161 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField rho,
fvMatrix< scalar > &  eqn,
const label  fieldI 
)
virtual

Reimplemented in effectivenessHeatExchangerSource, solidificationMeltingSource, and interRegionHeatTransferModel.

Definition at line 169 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField rho,
fvMatrix< vector > &  eqn,
const label  fieldI 
)
virtual
void addSup ( const volScalarField rho,
fvMatrix< symmTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 196 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField rho,
fvMatrix< sphericalTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 187 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField rho,
fvMatrix< tensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 205 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField alpha,
const volScalarField rho,
fvMatrix< scalar > &  eqn,
const label  fieldI 
)
virtual

Definition at line 214 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField alpha,
const volScalarField rho,
fvMatrix< vector > &  eqn,
const label  fieldI 
)
virtual

Reimplemented in explicitPorositySource.

Definition at line 226 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField alpha,
const volScalarField rho,
fvMatrix< symmTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 250 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField alpha,
const volScalarField rho,
fvMatrix< sphericalTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 238 of file fvOption.C.

References option::addSup().

Here is the call graph for this function:

void addSup ( const volScalarField alpha,
const volScalarField rho,
fvMatrix< tensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 262 of file fvOption.C.

void constrain ( fvMatrix< scalar > &  eqn,
const label  fieldI 
)
virtual

Reimplemented in fixedTemperatureConstraint.

Definition at line 273 of file fvOption.C.

Referenced by optionList::constrain(), option::constrain(), and option::iNew::operator()().

Here is the caller graph for this function:

void constrain ( fvMatrix< vector > &  eqn,
const label  fieldI 
)
virtual

Reimplemented in meanVelocityForce.

Definition at line 277 of file fvOption.C.

References option::constrain().

Here is the call graph for this function:

void constrain ( fvMatrix< sphericalTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 282 of file fvOption.C.

References option::constrain().

Here is the call graph for this function:

void constrain ( fvMatrix< symmTensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 290 of file fvOption.C.

void constrain ( fvMatrix< tensor > &  eqn,
const label  fieldI 
)
virtual

Definition at line 297 of file fvOption.C.

void correct ( volScalarField field)
virtual

Reimplemented in limitTemperature.

Definition at line 301 of file fvOption.C.

Referenced by optionList::correct(), option::correct(), and option::iNew::operator()().

Here is the caller graph for this function:

void correct ( volVectorField field)
virtual

Reimplemented in meanVelocityForce.

Definition at line 305 of file fvOption.C.

References option::correct().

Here is the call graph for this function:

virtual void correct ( volSphericalTensorField field)
virtual

Reimplemented in limitTemperature.

void correct ( volSymmTensorField field)
virtual

Definition at line 313 of file fvOption.C.

void correct ( volTensorField field)
virtual

Definition at line 317 of file fvOption.C.

void writeHeader ( Ostream os) const
virtual

Write the source header information.

Definition at line 30 of file fvOptionIO.C.

References token::BEGIN_BLOCK, Foam::incrIndent(), Foam::indent(), option::name_, and Foam::nl.

Referenced by option::iNew::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void writeFooter ( Ostream os) const
virtual

Write the source footer information.

Definition at line 37 of file fvOptionIO.C.

References Foam::decrIndent(), token::END_BLOCK, Foam::endl(), and Foam::indent().

Referenced by option::iNew::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

void writeData ( Ostream os) const
virtual

Write the source properties.

Definition at line 43 of file fvOptionIO.C.

References option::active_, option::coeffs_, token::END_STATEMENT, Foam::indent(), Foam::nl, Foam::type(), dictionary::write(), and Ostream::writeKeyword().

Referenced by option::iNew::operator()().

Here is the call graph for this function:

Here is the caller graph for this function:

bool read ( const dictionary dict)
virtual

Member Data Documentation

const word name_
protected

Source name.

Definition at line 72 of file fvOption.H.

Referenced by option::name(), and option::writeHeader().

const word modelType_
protected

Model type.

Definition at line 75 of file fvOption.H.

Referenced by option::read().

const fvMesh& mesh_
protected

Reference to the mesh database.

Definition at line 78 of file fvOption.H.

Referenced by cellSetOption::inTimeLimits(), and option::mesh().

dictionary dict_
protected

Top level source dictionary.

Definition at line 81 of file fvOption.H.

dictionary coeffs_
protected

Dictionary containing source coefficients.

Definition at line 84 of file fvOption.H.

Referenced by option::coeffs(), cellSetOption::read(), solidificationMeltingSource::read(), option::read(), and option::writeData().

Switch active_
protected

Source active flag.

Definition at line 87 of file fvOption.H.

Referenced by option::active(), option::read(), and option::writeData().

wordList fieldNames_
protected

Field names to apply source to - populated by derived models.

Definition at line 90 of file fvOption.H.

List<bool> applied_
protected

Applied flag list - corresponds to each fieldNames_ entry.

Definition at line 93 of file fvOption.H.

Referenced by option::setApplied().


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