Go to the documentation of this file.
49 const word& modelType,
55 modelType_(modelType),
58 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
59 active_(dict_.getOrDefault<
Switch>(
"active",
true)),
80 <<
"Selecting finite volume options type " << modelType <<
endl;
82 const_cast<Time&
>(
mesh.time()).libs().open
86 dictionaryConstructorTablePtr_
89 auto cstrIter = dictionaryConstructorTablePtr_->
cfind(modelType);
91 if (!cstrIter.found())
98 *dictionaryConstructorTablePtr_
116 return fieldNames_.find(fieldName);
127 <<
"Source " << name_ <<
" defined for field "
128 << fieldNames_[i] <<
" but never used" <<
endl;
virtual void correct(volScalarField &field)
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
virtual void checkApplied() const
Check that the source has been applied.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Ostream & endl(Ostream &os)
Add newline and flush stream.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Ostream & incrIndent(Ostream &os)
Increment the indent level.
#define forAll(list, i)
Loop across all elements in list.
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
Switch active_
Source active flag.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
defineRunTimeSelectionTable(option, dictionary)
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldi)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
Mesh data needed to do the Finite Volume discretisation.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & indent(Ostream &os)
Indent stream.
virtual bool isActive()
Is the source active?
errorManipArg< error, int > exit(error &err, const int errNo=1)
const_iterator cfind(const Key &key) const
Find and return an const_iterator set at the hashed entry.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
#define WarningInFunction
Report a warning using Foam::Warning.