Intermediate abstract class for handling face-set options for the derived faOptions. More...
Public Types | |
enum | selectionModeType { smAll, smFaceSet, smFaceZone, smPatch } |
Enumeration for selection mode types. More... | |
Public Member Functions | |
TypeName ("faceSetOption") | |
Runtime type information. More... | |
faceSetOption (const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh) | |
Construct from components. More... | |
virtual | ~faceSetOption ()=default |
Destructor. More... | |
scalar | timeStart () const noexcept |
Return const access to the time start. More... | |
scalar | duration () const noexcept |
Return const access to the duration. More... | |
bool | inTimeLimits (const scalar timeValue) const |
Return true if within time limits. More... | |
bool | useSubMesh () const noexcept |
True if sub-selection should be used. More... | |
selectionModeType | selectionMode () const noexcept |
Return the face selection mode. More... | |
const wordRes & | selectionNames () const noexcept |
Return const access to the selection names (set, zone or patch selection) More... | |
const wordRe & | zoneName () const |
Return const access to the first set/zone/patch name. More... | |
scalar | A () const noexcept |
Return const access to the total face area. More... | |
const labelList & | faces () const noexcept |
Return const access to the local finite-area face selection. More... | |
scalar | timeStart (scalar val) noexcept |
Adjust the time start, return the old value. More... | |
scalar | duration (scalar val) noexcept |
Adjust the duration, return the old value. More... | |
virtual bool | isActive () |
Is the source active? More... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
Public Member Functions inherited from option | |
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< option > | clone () const |
Return clone. More... | |
virtual | ~option ()=default |
Destructor. More... | |
const word & | name () const noexcept |
Return const access to the source name. More... | |
const fvMesh & | mesh () const noexcept |
Return const access to the mesh database. More... | |
const dictionary & | coeffs () const noexcept |
Return dictionary. More... | |
bool | active () const noexcept |
True if source is active. More... | |
void | setApplied (const label fieldi) |
Set the applied flag to true for field index fieldi. More... | |
const word & | regionName () const noexcept |
The region name. More... | |
const faMesh & | regionMesh () const |
Return the region mesh database (demand-driven) More... | |
const volSurfaceMapping & | vsm () const |
Return volSurfaceMapping (demand-driven) More... | |
bool | active (const bool on) noexcept |
Change source active flag, return previous value. 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 (const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, faMatrix< tensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< scalar > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< vector > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | addSup (const areaScalarField &h, const areaScalarField &rho, faMatrix< tensor > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< scalar > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< vector > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< sphericalTensor > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< symmTensor > &eqn, const label fieldi) |
virtual void | constrain (faMatrix< tensor > &eqn, const label fieldi) |
virtual void | correct (areaScalarField &field) |
virtual void | correct (areaVectorField &field) |
virtual void | correct (areaSphericalTensorField &field) |
virtual void | correct (areaSymmTensorField &field) |
virtual void | correct (areaTensorField &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... | |
Static Public Attributes | |
static const Enum< selectionModeType > | selectionModeTypeNames_ |
List of selection mode type names. More... | |
Protected Member Functions | |
void | setSelection (const dictionary &dict) |
Set face selection name from dictionary input. More... | |
void | setFaceSelection () |
Set face selection based on user input selection mode. More... | |
void | setArea () |
Recalculate the area. More... | |
template<class Type > | |
void | subsetFilter (List< Type > &field) const |
Zero all non-selected locations within field. More... | |
Protected Member Functions inherited from option | |
void | resetApplied () |
Resize/reset applied flag list for all fieldNames_ entries. More... | |
Protected Attributes | |
scalar | timeStart_ |
Time start. More... | |
scalar | duration_ |
Duration. More... | |
selectionModeType | selectionMode_ |
Face selection mode. More... | |
wordRes | selectionNames_ |
Face selection names (for set, zone or patch selections) More... | |
labelList | faces_ |
Set of faces to apply source to. More... | |
scalar | A_ |
Sum of face area. More... | |
Protected Attributes inherited from option | |
const word | name_ |
Source name. More... | |
const word | modelType_ |
Model type. More... | |
const fvMesh & | mesh_ |
Reference to the mesh database. More... | |
dictionary | dict_ |
Top level source dictionary. More... | |
dictionary | coeffs_ |
Dictionary containing source coefficients. 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... | |
word | regionName_ |
Region name (finite-area) More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from option | |
static autoPtr< option > | New (const word &name, const dictionary &dict, const fvMesh &mesh) |
Return a reference to the selected faOption model. More... | |
Public Attributes inherited from option | |
bool | log |
Switch write log to Info. More... | |
Intermediate abstract class for handling face-set options for the derived faOptions.
constant/faOptions
: <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=faceZone faceZones (<name> ...); //or: faceZone <name>; // when selectionMode=patch patches (<name> ...) //or: patch <name>; }
where the entries mean:
Property | Description | Type | Reqd | Dflt |
---|---|---|---|---|
selectionMode | Mode of face selection - see below | word | yes | - |
timeStart | Start time of faOption | scalar | no | -1 |
duration | Duration of faOption execution starting from timeStart | scalar | cndtnl | 0 |
faceSet | Name of operand faceSet | word | cndtnl | - |
faceZone | Name of operand faceZone(s) | wordRe | cndtnl | - |
faceZones | Names of operand faceZones | wordRes | cndtnl | - |
patch | Name of operand poly patch(s) | wordRe | cndtnl | - |
patches | Names of operand poly patches | wordRes | cndtnl | - |
Options for the selectionMode
entry:
all | Use all faces in the computational domain faceSet | Use subset corresponding to specified (volume) faceSet faceZones | Use subset corresponding to specified (volume) faceZones faceZone | Use subset corresponding to specified (volume) faceZones patch | Use subset corresponding of specified volume patches patches | Use subset corresponding of specified volume patches
The inherited entries are elaborated in:
Definition at line 168 of file faceSetOption.H.
enum selectionModeType |
Enumeration for selection mode types.
Enumerator | |
---|---|
smAll | "all" finite-area faces |
smFaceSet | "faceSet" : subset with (volume) face set |
smFaceZone | "faceZone" : subset with (volume) zone faces |
smPatch | "patch" : subset with (volume) patches |
Definition at line 179 of file faceSetOption.H.
faceSetOption | ( | const word & | name, |
const word & | modelType, | ||
const dictionary & | dict, | ||
const fvMesh & | mesh | ||
) |
Construct from components.
Definition at line 283 of file faceSetOption.C.
References Foam::decrIndent(), dict, Foam::incrIndent(), Foam::Info, and Foam::read().
|
virtualdefault |
Destructor.
|
protected |
Set face selection name from dictionary input.
Definition at line 52 of file faceSetOption.C.
References List< T >::clear(), dict, UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, UList< T >::first(), List< T >::resize(), faceSetOption::selectionMode_, faceSetOption::selectionModeTypeNames_, faceSetOption::selectionNames_, faceSetOption::smAll, faceSetOption::smFaceSet, faceSetOption::smFaceZone, and faceSetOption::smPatch.
|
protected |
Set face selection based on user input selection mode.
Definition at line 135 of file faceSetOption.C.
References Foam::endl(), Foam::exit(), faceLabels(), Foam::FatalError, FatalErrorInFunction, UList< T >::first(), Foam::flatOutput(), forAll, Foam::identity(), Foam::indent(), Foam::Info, Foam::nl, patchIDs(), pbm, List< T >::resize_nocopy(), Foam::returnReduceAnd(), UList< T >::size(), Foam::subset(), WarningInFunction, and zoneIDs.
|
protected |
Recalculate the area.
Definition at line 107 of file faceSetOption.C.
References IOstream::defaultPrecision(), Foam::endl(), Foam::indent(), Foam::Info, Foam::reduce(), Foam::returnReduce(), and Time::timeName().
|
inlineprotected |
Zero all non-selected locations within field.
Definition at line 24 of file faceSetOptionI.H.
References faceSetOption::faces_, field(), faceSetOption::selectionMode_, and Foam::Zero.
TypeName | ( | "faceSetOption" | ) |
Runtime type information.
|
inlinenoexcept |
Return const access to the time start.
Definition at line 42 of file faceSetOptionI.H.
|
inlinenoexcept |
Return const access to the duration.
Definition at line 48 of file faceSetOptionI.H.
|
inline |
Return true if within time limits.
Definition at line 54 of file faceSetOptionI.H.
|
inlinenoexcept |
True if sub-selection should be used.
Definition at line 88 of file faceSetOptionI.H.
Referenced by limitVelocity::correct(), and limitHeight::correct().
|
inlinenoexcept |
Return the face selection mode.
Definition at line 69 of file faceSetOptionI.H.
|
inlinenoexcept |
Return const access to the selection names (set, zone or patch selection)
Definition at line 76 of file faceSetOptionI.H.
|
inline |
Return const access to the first set/zone/patch name.
Definition at line 82 of file faceSetOptionI.H.
References wordRe::null.
|
inlinenoexcept |
Return const access to the total face area.
Definition at line 94 of file faceSetOptionI.H.
|
inlinenoexcept |
Return const access to the local finite-area face selection.
Definition at line 100 of file faceSetOptionI.H.
|
inlinenoexcept |
Adjust the time start, return the old value.
Definition at line 106 of file faceSetOptionI.H.
|
inlinenoexcept |
Adjust the duration, return the old value.
Definition at line 114 of file faceSetOptionI.H.
|
virtual |
Is the source active?
Reimplemented from option.
Definition at line 311 of file faceSetOption.C.
References option::isActive().
|
virtual |
Read source dictionary.
Reimplemented from option.
Reimplemented in externalHeatFluxSource, jouleHeatingSource, contactHeatFluxSource, externalFileSource, limitHeight, and limitVelocity.
Definition at line 336 of file faceSetOption.C.
References dict, and option::read().
Referenced by limitVelocity::read(), and limitHeight::read().
|
static |
List of selection mode type names.
Definition at line 190 of file faceSetOption.H.
Referenced by faceSetOption::setSelection().
|
protected |
Time start.
Definition at line 200 of file faceSetOption.H.
|
protected |
Duration.
Definition at line 205 of file faceSetOption.H.
|
protected |
Face selection mode.
Definition at line 210 of file faceSetOption.H.
Referenced by faceSetOption::setSelection(), and faceSetOption::subsetFilter().
|
protected |
Face selection names (for set, zone or patch selections)
Definition at line 215 of file faceSetOption.H.
Referenced by faceSetOption::setSelection().
|
protected |
Set of faces to apply source to.
Definition at line 220 of file faceSetOption.H.
Referenced by faceSetOption::subsetFilter().
|
protected |
Sum of face area.
Definition at line 225 of file faceSetOption.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.