Go to the documentation of this file.
57 const word& modelType,
63 modelType_(modelType),
64 mesh_(
patch.boundaryMesh().mesh()),
67 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
70 regionName_(
dict.get<
word>(
"region")),
71 regionMeshPtr_(
nullptr),
73 active_(
dict.getOrDefault(
"active",
true)),
92 <<
"Selecting finite area options type " << modelType <<
endl;
94 const_cast<Time&
>(
patch.boundaryMesh().mesh().time()).libs().open
98 dictionaryConstructorTablePtr_
101 auto* ctorPtr = dictionaryConstructorTable(modelType);
106 <<
"Unknown faOption model type "
107 << modelType <<
nl <<
nl
108 <<
"Valid faOption types are:" <<
nl
109 << dictionaryConstructorTablePtr_->sortedToc()
127 return fieldNames_.find(fieldName);
138 <<
"Source " << name_ <<
" defined for field "
139 << fieldNames_[i] <<
" but never used" <<
endl;
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A special matrix type and solver, designed for finite area solutions of scalar equations....
A class for handling words, derived from Foam::string.
virtual void constrain(faMatrix< scalar > &eqn, const label fieldi)
void resize(const label len)
Adjust allocated size of list.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
virtual void addSup(const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi)
virtual void checkApplied() const
Check that the source has been applied.
option(const word &name, const word &modelType, const dictionary &dict, const fvPatch &patch)
Construct from components.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvPatch &patch)
Return a reference to the selected faOption model.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Ostream & incrIndent(Ostream &os)
Increment the indent level.
defineTypeNameAndDebug(limitVelocity, 0)
#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.
wordList fieldNames_
Field names to apply source to - populated by derived models.
const dimensionedScalar h
Planck constant.
messageStream Info
Information stream (stdout output on master, null elsewhere)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual bool isActive()
Is the source active?
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual void correct(areaScalarField &field)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
defineRunTimeSelectionTable(option, dictionary)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
#define WarningInFunction
Report a warning using Foam::Warning.