60 const word& modelType,
66 modelType_(modelType),
69 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
72 active_(dict_.getOrDefault(
"active", true)),
94 <<
"Selecting finite volume options type " << modelType <<
endl;
96 mesh.time().libs().open
100 dictionaryConstructorTablePtr_
103 auto* ctorPtr = dictionaryConstructorTable(modelType);
112 *dictionaryConstructorTablePtr_
130 return fieldNames_.find(fieldName);
141 <<
"Source " << name_ <<
" defined for field " 142 << fieldNames_[i] <<
" but never used" <<
endl;
357 const word& designVariablesName
366 const word& designVariablesName
375 const word& designVariablesName
385 const word& fieldName
395 const word& fieldName
405 const word& fieldName
void size(const label n)
Older name for setAddressableSize.
virtual void correct(volScalarField &field)
Ostream & indent(Ostream &os)
Indent stream.
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
wordList fieldNames_
Field names to apply source to - populated by derived models.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
defineTypeNameAndDebug(atmAmbientTurbSource, 0)
virtual void postProcessAuxSens(const volScalarField &primalField, const volScalarField &adjointField, scalarField &sensField, const word &fieldName=word::null)
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.
#define forAll(list, i)
Loop across all elements in list.
static autoPtr< option > New(const word &name, const dictionary &dict, const fvMesh &mesh)
Return a reference to the selected fvOption model.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
const word name_
Source name.
A class for handling words, derived from Foam::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.
virtual void postProcessSens(scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
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.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
messageStream Info
Information stream (stdout output on master, null elsewhere)
option(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
virtual bool isActive()
Is the source active?
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Ostream & incrIndent(Ostream &os)
Increment the indent level.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
bool active_
Source active flag.
Base abstract class for handling finite volume options (i.e. fvOption).
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...