Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
cellSetOption Class Reference

Intermediate abstract class for handling cell-set options for the derived fvOptions. More...

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

Public Types

enum  selectionModeType { smAll, smCellSet, smCellZone, smPoints }
 

Public Member Functions

 TypeName ("cellSetOption")
 
 cellSetOption (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
 
virtual ~cellSetOption ()=default
 
scalar timeStart () const noexcept
 
scalar duration () const noexcept
 
bool inTimeLimits (const scalar timeValue) const
 
selectionModeType selectionMode () const noexcept
 
bool useSubMesh () const noexcept
 
const wordcellSetName () const noexcept
 
scalar V () const noexcept
 
const labelListcells () const noexcept
 
scalar timeStart (scalar val) noexcept
 
scalar duration (scalar val) noexcept
 
virtual bool isActive ()
 
virtual bool read (const dictionary &dict)
 
- Public Member Functions inherited from option
 TypeName ("option")
 
 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)
 
autoPtr< optionclone () const
 
virtual ~option ()=default
 
const wordname () const noexcept
 
const fvMeshmesh () const noexcept
 
const dictionarycoeffs () const noexcept
 
bool active () const noexcept
 
void setApplied (const label fieldi)
 
bool active (const bool on) noexcept
 
virtual label applyToField (const word &fieldName) const
 
virtual void checkApplied () const
 
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 postProcessSens (scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void postProcessSens (vectorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void postProcessSens (tensorField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
 
virtual void writeHeader (Ostream &) const
 
virtual void writeFooter (Ostream &) const
 
virtual void writeData (Ostream &) const
 

Static Public Attributes

static const Enum< selectionModeTypeselectionModeTypeNames_
 

Protected Member Functions

void setSelection (const dictionary &dict)
 
void setCellSelection ()
 
void setVol ()
 
- Protected Member Functions inherited from option
void resetApplied ()
 

Protected Attributes

scalar timeStart_
 
scalar duration_
 
selectionModeType selectionMode_
 
word cellSetName_
 
List< pointpoints_
 
labelList cells_
 
scalar V_
 
- Protected Attributes inherited from option
const word name_
 
const word modelType_
 
const fvMeshmesh_
 
dictionary dict_
 
dictionary coeffs_
 
wordList fieldNames_
 
List< boolapplied_
 
bool active_
 

Additional Inherited Members

- Static Public Member Functions inherited from option
static autoPtr< optionNew (const word &name, const dictionary &dict, const fvMesh &mesh)
 
- Public Attributes inherited from option
bool log
 

Detailed Description

Intermediate abstract class for handling cell-set options for the derived fvOptions.

Usage
Minimal example by using constant/fvOptions:
<userDefinedName1>
{
    // Mandatory/Optional (inherited) entries
    ...

    // Mandatory entries (unmodifiable)
    selectionMode     all;

    // Optional entries (runtime modifiable)
    timeStart         1.0;

    // Conditional mandatory entries (runtime modifiable)

        // when timeStart entry is present
        duration          1.4;

        // when selectionMode=cellSet
        cellSet           <cellSetName>;

        // when selectionMode=cellZone
        cellZone          <cellZoneName>;

        // when selectionMode=points
        points            (<point1> <point2> ... <pointN>);

    // Mandatory/Optional (derived) entries
    ...
}

where the entries mean:

Property Description Type Reqd Dflt
selectionMode Mode of cell selection - see below word yes -
timeStart Start time of fvOption scalar no -1
duration Duration of fvOption execution starting from timeStart scalar cndtnl 0
cellSet Name of operand cellSet word cndtnl -
cellZone Name of operand cellZone word cndtnl -
points Set of points in global coordinate system vectorList cndtnl -

Options for the selectionMode entry:

      all       | Use all cells in the computational domain
      cellZone  | Use a given cellZone
      cellSet   | Use a given cellSet
      points    | Use cells containing a given set of points

The inherited entries are elaborated in:

Note
  • Source/sink options are to be added to the right-hand side of equations.
Source files

Definition at line 159 of file cellSetOption.H.

Member Enumeration Documentation

◆ selectionModeType

Enumerator
smAll 
smCellSet 
smCellZone 
smPoints 

Definition at line 168 of file cellSetOption.H.

Constructor & Destructor Documentation

◆ cellSetOption()

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

Definition at line 193 of file cellSetOption.C.

References Foam::decrIndent(), dict, Foam::incrIndent(), Foam::Info, and Foam::read().

Here is the call graph for this function:

◆ ~cellSetOption()

virtual ~cellSetOption ( )
virtualdefault

Member Function Documentation

◆ setSelection()

void setSelection ( const dictionary dict)
protected

◆ setCellSelection()

void setCellSelection ( )
protected

◆ setVol()

void setVol ( )
protected

Definition at line 87 of file cellSetOption.C.

References IOstream::defaultPrecision(), Foam::endl(), Foam::indent(), Foam::Info, Foam::reduce(), Foam::returnReduce(), and Time::timeName().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "cellSetOption"  )

◆ timeStart() [1/2]

Foam::scalar timeStart ( ) const
inlinenoexcept

Definition at line 24 of file cellSetOptionI.H.

References cellSetOption::timeStart_.

◆ duration() [1/2]

Foam::scalar duration ( ) const
inlinenoexcept

Definition at line 30 of file cellSetOptionI.H.

◆ inTimeLimits()

bool inTimeLimits ( const scalar  timeValue) const
inline

Definition at line 36 of file cellSetOptionI.H.

◆ selectionMode()

Foam::fv::cellSetOption::selectionModeType selectionMode ( ) const
inlinenoexcept

Definition at line 51 of file cellSetOptionI.H.

◆ useSubMesh()

bool useSubMesh ( ) const
inlinenoexcept

Definition at line 57 of file cellSetOptionI.H.

Referenced by limitVelocity::correct(), and limitTemperature::correct().

Here is the caller graph for this function:

◆ cellSetName()

const Foam::word & cellSetName ( ) const
inlinenoexcept

Definition at line 63 of file cellSetOptionI.H.

◆ V()

Foam::scalar V ( ) const
inlinenoexcept

Definition at line 69 of file cellSetOptionI.H.

◆ cells()

const Foam::labelList & cells ( ) const
inlinenoexcept

Definition at line 75 of file cellSetOptionI.H.

◆ timeStart() [2/2]

Foam::scalar timeStart ( scalar  val)
inlinenoexcept

Definition at line 81 of file cellSetOptionI.H.

◆ duration() [2/2]

Foam::scalar duration ( scalar  val)
inlinenoexcept

Definition at line 89 of file cellSetOptionI.H.

◆ isActive()

bool isActive ( )
virtual

Reimplemented from option.

Definition at line 218 of file cellSetOption.C.

References option::isActive().

Here is the call graph for this function:

◆ read()

bool read ( const dictionary dict)
virtual

Member Data Documentation

◆ selectionModeTypeNames_

const Foam::Enum< Foam::fv::cellSetOption::selectionModeType > selectionModeTypeNames_
static

Definition at line 177 of file cellSetOption.H.

Referenced by cellSetOption::setSelection().

◆ timeStart_

scalar timeStart_
protected

Definition at line 185 of file cellSetOption.H.

Referenced by cellSetOption::timeStart().

◆ duration_

scalar duration_
protected

Definition at line 188 of file cellSetOption.H.

◆ selectionMode_

selectionModeType selectionMode_
protected

Definition at line 191 of file cellSetOption.H.

Referenced by cellSetOption::setSelection().

◆ cellSetName_

word cellSetName_
protected

Definition at line 194 of file cellSetOption.H.

Referenced by cellSetOption::setSelection().

◆ points_

List<point> points_
protected

Definition at line 197 of file cellSetOption.H.

Referenced by cellSetOption::setSelection().

◆ cells_

labelList cells_
protected

◆ V_

scalar V_
protected

Definition at line 203 of file cellSetOption.H.

Referenced by meanVelocityForce::correct().


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