60 const word& modelType,
66 modelType_(modelType),
69 coeffs_(
dict.optionalSubDict(modelType +
"Coeffs")),
72 active_(dict_.getOrDefault(
"active", true)),
91 <<
"Selecting finite volume 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;
341 const word& fieldName,
342 const word& designVariablesName
350 const word& fieldName,
351 const word& designVariablesName
359 const word& fieldName,
360 const word& designVariablesName
void resize_nocopy(const label len)
Adjust allocated size of list without necessarily.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void size(const label n)
Older name for setAddressableSize.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Base abstract class for handling finite area options (i.e. faOption).
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
Base abstract class for handling finite volume options (i.e. fvOption).
List< bool > applied_
Applied flag list - corresponds to each fieldNames_ entry.
wordList fieldNames_
Field names to apply source to - populated by derived models.
virtual void checkApplied() const
Check that the source has been applied.
virtual void postProcessSens(scalarField &sensField, const word &fieldName=word::null, const word &designVariablesName=word::null)
virtual label applyToField(const word &fieldName) const
Return index of field name if found in fieldNames list.
virtual void addSup(fvMatrix< scalar > &eqn, const label fieldi)
virtual void constrain(fvMatrix< scalar > &eqn, const label fieldi)
virtual bool isActive()
Is the source active?
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const word name_
Source name.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & indent(Ostream &os)
Indent stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.