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 |
Return const access to the source name. More... | |
const fvMesh & | mesh () const |
Return const access to the mesh database. More... | |
const fvPatch & | patch () const |
Return const access to fvPatch. More... | |
const dictionary & | coeffs () 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... | |
const faMesh & | regionMesh () const |
Return the region mesh database. More... | |
const volSurfaceMapping & | vsm () const |
Return volSurfaceMapping. More... | |
const word & | regionName () const |
Region name. More... | |
Switch & | active () |
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 (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... | |
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... | |
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... | |
word | regionName_ |
Region name. More... | |
autoPtr< faMesh > | regionMeshPtr_ |
Pointer to the region mesh database. More... | |
autoPtr< volSurfaceMapping > | vsmPtr_ |
Volume-to surface mapping. 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 134 of file faOption.H.
option | ( | const word & | name, |
const word & | modelType, | ||
const dictionary & | dict, | ||
const fvPatch & | patch | ||
) |
Construct from components.
Definition at line 57 of file faOption.C.
References Foam::decrIndent(), Foam::endl(), Foam::incrIndent(), Foam::indent(), and Foam::Info.
|
virtualdefault |
Destructor.
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 86 of file faOption.C.
References HashTable< T, Key, Hash >::cfind(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, dictionary::get(), Foam::indent(), Foam::Info, Foam::name(), Foam::nl, and Foam::foamVersion::patch.
Referenced by option::iNew::operator()(), and optionList::reset().
|
inline |
Return const access to the source name.
Definition at line 30 of file faOptionI.H.
References option::name_.
Referenced by optionList::correct(), optionList::operator()(), optionList::readOptions(), and optionList::source().
|
inline |
Return const access to the mesh database.
Definition at line 36 of file faOptionI.H.
|
inline |
Return const access to fvPatch.
Definition at line 42 of file faOptionI.H.
|
inline |
Return dictionary.
Definition at line 48 of file faOptionI.H.
|
inline |
Return const access to the source active flag.
Definition at line 54 of file faOptionI.H.
|
inline |
Set the applied flag to true for field index fieldi.
Definition at line 60 of file faOptionI.H.
Referenced by optionList::correct(), optionList::operator()(), and optionList::source().
|
inline |
Return the region mesh database.
Definition at line 78 of file faOptionI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Return volSurfaceMapping.
Definition at line 93 of file faOptionI.H.
References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.
|
inline |
Region name.
Definition at line 72 of file faOptionI.H.
|
inline |
Return access to the source active flag.
Definition at line 66 of file faOptionI.H.
|
virtual |
Is the source active?
Reimplemented in faceSetOption.
Definition at line 122 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 128 of file faOption.C.
Referenced by optionList::correct(), optionList::operator()(), and optionList::source().
|
virtual |
Check that the source has been applied.
Definition at line 134 of file faOption.C.
References Foam::endl(), forAll, and WarningInFunction.
Referenced by optionList::checkApplied().
|
virtual |
Reimplemented in externalFileSource.
Definition at line 149 of file faOption.C.
Referenced by optionList::operator()(), and optionList::source().
|
virtual |
Definition at line 158 of file faOption.C.
|
virtual |
Definition at line 176 of file faOption.C.
|
virtual |
Definition at line 167 of file faOption.C.
|
virtual |
Definition at line 185 of file faOption.C.
|
virtual |
Reimplemented in externalHeatFluxSource, jouleHeatingSource, and contactHeatFluxSource.
Definition at line 194 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 214 of file faOption.C.
|
virtual |
Definition at line 234 of file faOption.C.
|
virtual |
Definition at line 243 of file faOption.C.
Definition at line 247 of file faOption.C.
|
virtual |
Definition at line 252 of file faOption.C.
|
virtual |
Definition at line 260 of file faOption.C.
Definition at line 267 of file faOption.C.
|
virtual |
Definition at line 271 of file faOption.C.
Referenced by optionList::correct().
|
virtual |
Definition at line 275 of file faOption.C.
|
virtual |
Definition at line 279 of file faOption.C.
|
virtual |
Definition at line 283 of file faOption.C.
|
virtual |
Definition at line 287 of file faOption.C.
|
virtual |
Write the source header information.
Definition at line 32 of file faOptionIO.C.
References Ostream::beginBlock(), and option::name_.
|
virtual |
Write the source footer information.
Definition at line 38 of file faOptionIO.C.
References Ostream::endBlock().
|
virtual |
Write the source properties.
Definition at line 44 of file faOptionIO.C.
References Foam::nl, Foam::type(), and Ostream::writeEntry().
|
virtual |
Read source dictionary.
Reimplemented in externalHeatFluxSource, jouleHeatingSource, faceSetOption, contactHeatFluxSource, and externalFileSource.
Definition at line 54 of file faOptionIO.C.
References dict.
Referenced by externalFileSource::read(), contactHeatFluxSource::read(), faceSetOption::read(), jouleHeatingSource::read(), externalHeatFluxSource::read(), and optionList::readOptions().
|
protected |
Source name.
Definition at line 147 of file faOption.H.
Referenced by option::name(), and option::writeHeader().
|
protected |
Model type.
Definition at line 150 of file faOption.H.
|
protected |
Reference to the mesh database.
Definition at line 153 of file faOption.H.
|
protected |
Reference to the patch.
Definition at line 156 of file faOption.H.
|
protected |
Top level source dictionary.
Definition at line 159 of file faOption.H.
|
protected |
Dictionary containing source coefficients.
Definition at line 162 of file faOption.H.
|
protected |
Source active flag.
Definition at line 165 of file faOption.H.
|
protected |
Field names to apply source to - populated by derived models.
Definition at line 168 of file faOption.H.
Applied flag list - corresponds to each fieldNames_ entry.
Definition at line 171 of file faOption.H.
|
protected |
Region name.
Definition at line 174 of file faOption.H.
Pointer to the region mesh database.
Definition at line 177 of file faOption.H.
|
protected |
Volume-to surface mapping.
Definition at line 180 of file faOption.H.