Base abstract class for handling finite area options (i.e. faOption
).
More...
Classes | |
class | iNew |
Public Member Functions | |
TypeName ("option") | |
Runtime type information. More... | |
declareRunTimeSelectionTable (autoPtr, option, dictionary,(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch),(name, modelType, dict, patch)) | |
option (const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch) | |
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 fvPatch & | patch () const noexcept |
Return const access to fvPatch. 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 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 (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... | |
virtual bool | read (const dictionary &dict) |
Read source dictionary. More... | |
Static Public Member Functions | |
static autoPtr< option > | New (const word &name, const dictionary &dict, const fvPatch &patch) |
Return a reference to the selected faOption model. More... | |
Public Attributes | |
bool | log |
Switch write log to Info. More... | |
Protected Member Functions | |
void | resetApplied () |
Resize/reset applied flag list for all fieldNames_ entries. More... | |
Protected Attributes | |
const word | name_ |
Source name. More... | |
const word | modelType_ |
Model type. More... | |
const fvMesh & | mesh_ |
Reference to the mesh database. More... | |
const fvPatch & | patch_ |
Reference to the patch. 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... | |
Base abstract class for handling finite area options (i.e. faOption
).
constant/faOptions
: <userDefinedName1> { // Mandatory entries (unmodifiable) type <faOptionName>; // Mandatory entries (runtime modifiable) region <regionName>; // Optional entries (unmodifiable/runtime modifiable) <faOption>Coeffs { // subdictionary entries } // Optional entries (runtime modifiable) active true; log true; }
where the entries mean:
Property | Description | Type | Reqd | Dflt |
---|---|---|---|---|
type | Name of operand faOption | word | yes | - |
region | Name of operand region | word | yes | - |
<faOption>Coeffs | Dictionary containing settings of the selected faOption settings | dictionary | no | - |
active | Flag to (de)activate faOption | bool | no | true |
log | Flag to log faOption-related info | bool | no | true |
Definition at line 133 of file faOption.H.
option | ( | const word & | name, |
const word & | modelType, | ||
const dictionary & | dict, | ||
const fvPatch & | patch | ||
) |
Construct from components.
Definition at line 54 of file faOption.C.
References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), Log, and option::name_.
|
virtualdefault |
Destructor.
|
protected |
Resize/reset applied flag list for all fieldNames_ entries.
Definition at line 45 of file faOption.C.
References option::applied_, option::fieldNames_, List< T >::resize_nocopy(), and UList< T >::size().
Referenced by contactHeatFluxSource::contactHeatFluxSource(), externalFileSource::externalFileSource(), externalHeatFluxSource::externalHeatFluxSource(), and jouleHeatingSource::jouleHeatingSource().
TypeName | ( | "option" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
option | , | ||
dictionary | , | ||
(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch) | , | ||
(name, modelType, dict, patch) | |||
) |
|
static |
Return a reference to the selected faOption model.
Definition at line 82 of file faOption.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), Foam::indent(), Foam::Info, and Foam::name().
|
inlinenoexcept |
Return const access to the source name.
Definition at line 30 of file faOptionI.H.
References option::name_.
Referenced by optionList::constrain(), optionList::correct(), optionList::operator()(), and optionList::readOptions().
|
inlinenoexcept |
Return const access to the mesh database.
Definition at line 36 of file faOptionI.H.
|
inlinenoexcept |
Return const access to fvPatch.
Definition at line 42 of file faOptionI.H.
|
inlinenoexcept |
Return dictionary.
Definition at line 48 of file faOptionI.H.
|
inlinenoexcept |
True if source is active.
Definition at line 54 of file faOptionI.H.
|
inline |
Set the applied flag to true for field index fieldi.
Definition at line 68 of file faOptionI.H.
Referenced by optionList::constrain(), optionList::correct(), and optionList::operator()().
|
inlinenoexcept |
The region name.
Definition at line 74 of file faOptionI.H.
|
inline |
Return the region mesh database (demand-driven)
Definition at line 80 of file faOptionI.H.
|
inline |
Return volSurfaceMapping (demand-driven)
Definition at line 90 of file faOptionI.H.
Change source active flag, return previous value.
Definition at line 60 of file faOptionI.H.
|
virtual |
Is the source active?
Reimplemented in faceSetOption.
Definition at line 120 of file faOption.C.
Referenced by optionList::constrain(), optionList::correct(), faceSetOption::isActive(), and optionList::operator()().
|
virtual |
Return index of field name if found in fieldNames list.
Definition at line 126 of file faOption.C.
Referenced by optionList::appliesToField(), optionList::constrain(), optionList::correct(), and optionList::operator()().
|
virtual |
Check that the source has been applied.
Definition at line 132 of file faOption.C.
References Foam::endl(), forAll, and WarningInFunction.
Referenced by optionList::checkApplied().
|
virtual |
Reimplemented in externalFileSource.
Definition at line 146 of file faOption.C.
Referenced by optionList::operator()().
|
virtual |
Definition at line 155 of file faOption.C.
|
virtual |
Definition at line 173 of file faOption.C.
|
virtual |
Definition at line 164 of file faOption.C.
|
virtual |
Definition at line 182 of file faOption.C.
|
virtual |
Reimplemented in contactHeatFluxSource, externalHeatFluxSource, and jouleHeatingSource.
Definition at line 191 of file faOption.C.
|
virtual |
Definition at line 201 of file faOption.C.
|
virtual |
Definition at line 221 of file faOption.C.
|
virtual |
Definition at line 211 of file faOption.C.
|
virtual |
Definition at line 231 of file faOption.C.
|
virtual |
Definition at line 241 of file faOption.C.
Referenced by optionList::constrain().
Definition at line 245 of file faOption.C.
|
virtual |
Definition at line 249 of file faOption.C.
|
virtual |
Definition at line 257 of file faOption.C.
Definition at line 265 of file faOption.C.
|
virtual |
Definition at line 269 of file faOption.C.
Referenced by optionList::correct().
|
virtual |
Reimplemented in limitVelocity.
Definition at line 273 of file faOption.C.
|
virtual |
Definition at line 277 of file faOption.C.
|
virtual |
Definition at line 281 of file faOption.C.
|
virtual |
Definition at line 285 of file faOption.C.
|
virtual |
Write the source header information.
Definition at line 32 of file faOptionIO.C.
References Ostream::beginBlock(), option::name_, os(), and option::writeHeader().
Referenced by optionList::writeData(), and option::writeHeader().
|
virtual |
Write the source footer information.
Definition at line 38 of file faOptionIO.C.
References os().
Referenced by optionList::writeData().
|
virtual |
Write the source properties.
Definition at line 44 of file faOptionIO.C.
References Foam::nl, os(), Foam::type(), and option::writeData().
Referenced by option::writeData(), and optionList::writeData().
|
virtual |
Read source dictionary.
Reimplemented in limitVelocity, faceSetOption, contactHeatFluxSource, externalFileSource, externalHeatFluxSource, and jouleHeatingSource.
Definition at line 54 of file faOptionIO.C.
References dict.
Referenced by optionList::readOptions().
|
protected |
Source name.
Definition at line 146 of file faOption.H.
Referenced by option::name(), option::option(), and option::writeHeader().
|
protected |
Model type.
Definition at line 149 of file faOption.H.
|
protected |
Reference to the mesh database.
Definition at line 152 of file faOption.H.
|
protected |
Reference to the patch.
Definition at line 155 of file faOption.H.
|
protected |
Top level source dictionary.
Definition at line 158 of file faOption.H.
|
protected |
Dictionary containing source coefficients.
Definition at line 161 of file faOption.H.
Referenced by faceSetOption::faceSetOption(), and jouleHeatingSource::jouleHeatingSource().
|
protected |
Field names to apply source to - populated by derived models.
Definition at line 164 of file faOption.H.
Referenced by contactHeatFluxSource::contactHeatFluxSource(), externalFileSource::externalFileSource(), externalHeatFluxSource::externalHeatFluxSource(), jouleHeatingSource::jouleHeatingSource(), limitVelocity::limitVelocity(), and option::resetApplied().
Applied flag list - corresponds to each fieldNames_ entry.
Definition at line 167 of file faOption.H.
Referenced by limitVelocity::limitVelocity(), and option::resetApplied().
|
protected |
Region name (finite-area)
Definition at line 170 of file faOption.H.
bool log |
Switch write log to Info.
Definition at line 196 of file faOption.H.