40 const word& modelType,
60 label count = fieldValuesDict.
size();
62 fieldNames_.resize(count);
63 fieldValues_.resize(count);
68 for (
const entry& dEntry : fieldValuesDict)
70 fieldNames_[count] = dEntry.keyword();
71 dEntry.readEntry(fieldValues_[count]);
91 <<
"FixedValueConstraint<"
93 <<
">::constrain for source " << name_ <<
endl;
95 eqn.
setValues(cells_, fieldValues_[fieldi]);
label size() const noexcept
The number of elements in list.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
A keyword and a list of tokens is an 'entry'.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
void setValues(const labelUList &cellLabels, const Type &value)
Set solution in given cells to the specified value and eliminate the corresponding equations from the...
Mesh data needed to do the Finite Volume discretisation.
FixedValueConstraint(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void constrain(fvMatrix< Type > &eqn, const label fieldi)
Set value on field.
labelList cells_
Set of cells to apply source to.
virtual bool read(const dictionary &dict)
Read source dictionary.
cellSetOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
const word & name() const noexcept
Return const access to the source name.
wordList fieldNames_
Field names to apply source to - populated by derived models.
dictionary coeffs_
Dictionary containing source coefficients.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
const fvMesh & mesh() const noexcept
Return const access to the mesh database.
const word name_
Source name.
A traits class, which is primarily used for primitives and vector-space.
A class for handling words, derived from Foam::string.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
#define DebugInfo
Report an information message using Foam::Info.
Namespace for finite-volume.
Ostream & endl(Ostream &os)
Add newline and flush stream.