Go to the documentation of this file.
46 const word& modelType,
52 modelType_(modelType),
55 coeffs_(
dict.subDict(modelType +
"Coeffs")),
56 active_(dict_.lookupOrDefault<
Switch>(
"active",
true)),
76 <<
"Selecting finite volume options model type " << modelType <<
endl;
78 dictionaryConstructorTable::iterator cstrIter =
79 dictionaryConstructorTablePtr_->find(modelType);
81 if (cstrIter == dictionaryConstructorTablePtr_->end())
84 <<
"Unknown Model type " << modelType <<
nl <<
nl
85 <<
"Valid model types are:" <<
nl
86 << dictionaryConstructorTablePtr_->sortedToc()
108 return findIndex(fieldNames_, fieldName);
119 <<
"Source " << name_ <<
" defined for field "
120 << fieldNames_[i] <<
" but never used" <<
endl;
virtual void correct(volScalarField &field)
GeometricField< tensor, fvPatchField, volMesh > volTensorField
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
virtual void checkApplied() const
Check that the source has been applied.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
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 ~option()
Destructor.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Finite volume options abtract base class. Provides a base set of controls, e.g.
defineRunTimeSelectionTable(option, dictionary)
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldI)
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldI)
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)
defineTypeNameAndDebug(option, 0)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Generic GeometricField class.
#define WarningInFunction
Report a warning using Foam::Warning.
word name(const complex &)
Return a string representation of a complex.