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;
219 addSup(alpha*rho, eqn, fieldi);
231 addSup(alpha*rho, eqn, fieldi);
243 addSup(alpha*rho, eqn, fieldi);
255 addSup(alpha*rho, eqn, fieldi);
267 addSup(alpha*rho, eqn, fieldi);
defineTypeNameAndDebug(option, 0)
#define forAll(list, i)
Loop across all elements in list.
virtual void correct(volScalarField &field)
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.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void checkApplied() const
Check that the source has been applied.
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
Ostream & endl(Ostream &os)
Add newline and flush stream.
A simple wrapper around bool so that it can be read as a word: true/false, on/off, yes/no, y/n, t/f, or none.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
A class for handling words, derived from string.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
label findIndex(const ListType &, typename ListType::const_reference, const label start=0)
Find first occurence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
defineRunTimeSelectionTable(option, dictionary)
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldi)
Mesh data needed to do the Finite Volume discretisation.
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
virtual bool isActive()
Is the source active?
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.