46 const word& modelType,
52 modelType_(modelType),
56 active_(dict_.lookupOrDefault<
Switch>(
"active",
true)),
76 <<
"Selecting finite volume options model type " << modelType <<
endl;
78 const_cast<Time&
>(mesh.
time()).libs().open
82 dictionaryConstructorTablePtr_
85 dictionaryConstructorTable::iterator cstrIter =
86 dictionaryConstructorTablePtr_->
find(modelType);
88 if (cstrIter == dictionaryConstructorTablePtr_->end())
91 <<
"Unknown Model type " << modelType <<
nl <<
nl 92 <<
"Valid model types are:" <<
nl 93 << dictionaryConstructorTablePtr_->sortedToc()
115 return findIndex(fieldNames_, fieldName);
126 <<
"Source " << name_ <<
" defined for field " 127 << fieldNames_[i] <<
" but never used" <<
endl;
226 addSup(alpha*rho, eqn, fieldi);
238 addSup(alpha*rho, eqn, fieldi);
250 addSup(alpha*rho, eqn, fieldi);
262 addSup(alpha*rho, eqn, fieldi);
274 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)
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.
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.
const Time & time() const
Return the top-level database.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
iterator find(const Key &)
Find and return an iterator set at the hashedEntry.
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)
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
A class for handling words, derived from string.
virtual void checkApplied() const
Check that the source has been applied.
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 occurrence of given element and return index,.
word name(const complex &)
Return a string representation of a complex.
defineRunTimeSelectionTable(option, dictionary)
#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?
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Finite volume options abstract base class. Provides a base set of controls, e.g.: ...