Base abstract class for handling finite area options (i.e. faOption).
More...


Classes | |
| class | iNew |
| Return pointer to new faOption object created on the freestore from an Istream. 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< 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 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 fvMesh &mesh) |
| 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... | |
| 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 129 of file faOption.H.
| option | ( | const word & | name, |
| const word & | modelType, | ||
| const dictionary & | dict, | ||
| const fvMesh & | mesh | ||
| ) |
Construct from components.
Definition at line 48 of file faOption.C.
References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), and Log.

|
virtualdefault |
Destructor.
|
protected |
Resize/reset applied flag list for all fieldNames_ entries.
Definition at line 38 of file faOption.C.
References option::applied_, option::fieldNames_, List< T >::resize_nocopy(), and UList< T >::size().

| 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) | |||
| ) |
|
static |
Return a reference to the selected faOption model.
Definition at line 75 of file faOption.C.
References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), Foam::indent(), Foam::Info, mesh, and Foam::name().
Referenced by option::iNew::operator()(), and optionList::reset().


|
inlinenoexcept |
Return const access to the source name.
Definition at line 23 of file faOptionI.H.
References option::name_.
Referenced by contactHeatFluxSource::addSup(), optionList::correct(), optionList::operator()(), optionList::readOptions(), and optionList::source().

|
inlinenoexcept |
Return const access to the mesh database.
Definition at line 29 of file faOptionI.H.
|
inlinenoexcept |
Return dictionary.
Definition at line 35 of file faOptionI.H.
|
inlinenoexcept |
True if source is active.
Definition at line 41 of file faOptionI.H.
|
inline |
Set the applied flag to true for field index fieldi.
Definition at line 55 of file faOptionI.H.
Referenced by optionList::correct(), optionList::operator()(), and optionList::source().

|
inlinenoexcept |
The region name.
Definition at line 61 of file faOptionI.H.
|
inline |
Return the region mesh database (demand-driven)
Definition at line 67 of file faOptionI.H.
|
inline |
Return volSurfaceMapping (demand-driven)
Definition at line 77 of file faOptionI.H.
|
inlinenoexcept |
Change source active flag, return previous value.
Definition at line 47 of file faOptionI.H.
|
virtual |
Is the source active?
Reimplemented in faceSetOption.
Definition at line 112 of file faOption.C.
Referenced by optionList::correct(), faceSetOption::isActive(), optionList::operator()(), and optionList::source().

|
virtual |
Return index of field name if found in fieldNames list.
Definition at line 118 of file faOption.C.
Referenced by optionList::appliesToField(), optionList::correct(), optionList::operator()(), and optionList::source().

|
virtual |
Check that the source has been applied.
Definition at line 124 of file faOption.C.
References Foam::endl(), forAll, and WarningInFunction.
Referenced by optionList::checkApplied().


|
virtual |
Reimplemented in externalFileSource.
Definition at line 139 of file faOption.C.
Referenced by optionList::operator()(), and optionList::source().

|
virtual |
Definition at line 148 of file faOption.C.
|
virtual |
Definition at line 166 of file faOption.C.
|
virtual |
Definition at line 157 of file faOption.C.
|
virtual |
Definition at line 175 of file faOption.C.
|
virtual |
Reimplemented in externalHeatFluxSource, jouleHeatingSource, and contactHeatFluxSource.
Definition at line 184 of file faOption.C.
|
virtual |
Definition at line 194 of file faOption.C.
|
virtual |
Definition at line 214 of file faOption.C.
|
virtual |
Definition at line 204 of file faOption.C.
|
virtual |
Definition at line 224 of file faOption.C.
|
virtual |
Definition at line 233 of file faOption.C.
Definition at line 237 of file faOption.C.
|
virtual |
Definition at line 242 of file faOption.C.
|
virtual |
Definition at line 250 of file faOption.C.
Definition at line 257 of file faOption.C.
|
virtual |
Reimplemented in limitHeight.
Definition at line 261 of file faOption.C.
Referenced by optionList::correct().

|
virtual |
Reimplemented in limitVelocity.
Definition at line 265 of file faOption.C.
|
virtual |
Definition at line 269 of file faOption.C.
|
virtual |
Definition at line 273 of file faOption.C.
|
virtual |
Definition at line 277 of file faOption.C.
|
virtual |
Write the source header information.
Definition at line 25 of file faOptionIO.C.
References option::name_, and os().
Referenced by optionList::writeData().


|
virtual |
Write the source footer information.
Definition at line 31 of file faOptionIO.C.
References os().
Referenced by optionList::writeData().


|
virtual |
Write the source properties.
Definition at line 37 of file faOptionIO.C.
References Foam::nl, os(), and Foam::type().
Referenced by optionList::writeData().


|
virtual |
Read source dictionary.
Reimplemented in faceSetOption, externalHeatFluxSource, jouleHeatingSource, contactHeatFluxSource, externalFileSource, limitHeight, and limitVelocity.
Definition at line 47 of file faOptionIO.C.
References dict.
Referenced by externalFileSource::read(), contactHeatFluxSource::read(), jouleHeatingSource::read(), externalHeatFluxSource::read(), faceSetOption::read(), and optionList::readOptions().

|
protected |
Source name.
Definition at line 146 of file faOption.H.
Referenced by option::name(), and option::writeHeader().
|
protected |
Model type.
Definition at line 151 of file faOption.H.
|
protected |
Reference to the mesh database.
Definition at line 156 of file faOption.H.
Referenced by externalHeatFluxSource::read().
|
protected |
Top level source dictionary.
Definition at line 161 of file faOption.H.
|
protected |
Dictionary containing source coefficients.
Definition at line 166 of file faOption.H.
Referenced by limitVelocity::read(), and limitHeight::read().
|
protected |
Field names to apply source to - populated by derived models.
Definition at line 171 of file faOption.H.
Referenced by limitHeight::read(), and option::resetApplied().
|
protected |
Applied flag list - corresponds to each fieldNames_ entry.
Definition at line 176 of file faOption.H.
Referenced by limitHeight::read(), and option::resetApplied().
|
protected |
Region name (finite-area)
Definition at line 181 of file faOption.H.
| bool log |
Switch write log to Info.
Definition at line 217 of file faOption.H.