57 const word& modelType,
63 modelType_(modelType),
66 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
70 regionMeshPtr_(nullptr),
72 active_(
dict.getOrDefault(
"active", true)),
91 <<
"Selecting finite area options type " << modelType <<
endl;
93 mesh.time().libs().open
97 dictionaryConstructorTablePtr_
100 auto* ctorPtr = dictionaryConstructorTable(modelType);
109 *dictionaryConstructorTablePtr_
127 return fieldNames_.find(fieldName);
138 <<
"Source " << name_ <<
" defined for field " 139 << fieldNames_[i] <<
" but never used" <<
endl;
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
void size(const label n)
Older name for setAddressableSize.
Ostream & indent(Ostream &os)
Indent stream.
wordList fieldNames_
Field names to apply source to - populated by derived models.
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void constrain(faMatrix< scalar > &eqn, const label fieldi)
Ostream & endl(Ostream &os)
Add newline and flush stream.
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Base abstract class for handling finite area options (i.e. faOption).
#define forAll(list, i)
Loop across all elements in list.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
const word name_
Source name.
A class for handling words, derived from Foam::string.
virtual void addSup(const areaScalarField &h, faMatrix< scalar > &eqn, const label fieldi)
virtual void checkApplied() const
Check that the source has been applied.
defineTypeNameAndDebug(limitHeight, 0)
virtual void correct(areaScalarField &field)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected faOption model.
const dimensionedScalar h
Planck constant.
defineRunTimeSelectionTable(option, dictionary)
#define WarningInFunction
Report a warning using Foam::Warning.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
Mesh data needed to do the Finite Volume discretisation.
A special matrix type and solver, designed for finite area solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
virtual bool isActive()
Is the source active?
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
GeometricField< scalar, faPatchField, areaMesh > areaScalarField
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...