41 return mesh_.time().
libs();
48 return "fvOption::" + name_;
55 redirectOptionPtr_.reset(
nullptr);
89 if (codeAddSup_.empty())
97 if (codeAddSupRho_.empty())
115 <<
"compile " << name_ <<
" sha1: " << context.
sha1() <<
endl;
122 "-I$(LIB_SRC)/finiteVolume/lnInclude \\\n" 123 "-I$(LIB_SRC)/fvOptions/lnInclude \\\n" 124 "-I$(LIB_SRC)/meshTools/lnInclude \\\n" 125 "-I$(LIB_SRC)/sampling/lnInclude \\\n" 127 +
"\n\nLIB_LIBS = \\\n" 128 " -lfiniteVolume \\\n" 143 const word& modelType,
166 coeffs_.readEntry(
"fields", fieldNames_);
170 dict.readCompat<
word>(
"name", {{
"redirectType", 1706}}, name_);
177 ctx.readEntry(
"codeCorrect", codeCorrect_);
182 const bool mandatory =
184 !ctx.findEntry(
"codeAddSup")
185 && !ctx.findEntry(
"codeAddSupRho")
188 ctx.readEntry(
"codeAddSup", codeAddSup_, mandatory);
189 ctx.readEntry(
"codeAddSupRho", codeAddSupRho_, mandatory);
194 coeffs_.lookupEntryCompat
197 {{
"codeSetValue", 1812 }},
210 if (!redirectOptionPtr_)
213 constructDict.
set(
"type", name_);
214 constructDict.
changeKeyword(modelType_ &
"Coeffs", name_ &
"Coeffs");
223 return *redirectOptionPtr_;
235 <<
">::correct for source " << name_ <<
endl;
237 updateLibrary(name_);
238 redirectOption().correct(
field);
251 <<
">::addSup for source " << name_ <<
endl;
253 updateLibrary(name_);
254 redirectOption().addSup(eqn, fieldi);
268 <<
">::addSup(rho) for source " << name_ <<
endl;
270 updateLibrary(name_);
271 redirectOption().addSup(
rho, eqn, fieldi);
284 <<
">::constrain for source " << name_ <<
endl;
286 updateLibrary(name_);
287 redirectOption().constrain(eqn, fieldi);
A list of keyword definitions, which are a keyword followed by a number of values (eg...
void setMakeOptions(const std::string &content)
Define contents for Make/options.
virtual void correct(GeometricField< Type, fvPatchField, volMesh > &)
Correct field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const dictionary & codeDict() const
Get the dictionary to initialize the code context.
A traits class, which is primarily used for primitives.
virtual void clearRedirect() const
Clear redirected object(s)
virtual bool read(const dictionary &dict)
Read source dictionary.
Generic GeometricField class.
virtual void constrain(fvMatrix< Type > &eqn, const label fieldi)
Set value.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
static dlLibraryTable & libs()
Table of global libraries.
fv::option & redirectOption() const
Dynamically compiled fvOption.
virtual bool read(const dictionary &dict)
Read source dictionary.
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 INVALID.
const string & options() const noexcept
The code options (Make/options)
A class for handling words, derived from Foam::string.
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 string description() const
Description (type + name) for the output.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
A table of dynamically loaded libraries.
#define DebugInfo
Report an information message using Foam::Info.
void setCodeContext(const dictionary &dict)
Set code context from a dictionary.
CodedSource(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from components.
Tools for handling dynamic code compilation.
virtual void addSup(fvMatrix< Type > &eqn, const label fieldi)
Explicit/implicit matrix contributions.
Encapsulation of dynamic code dictionaries.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
Mesh data needed to do the Finite Volume discretisation.
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
A special matrix type and solver, designed for finite volume solutions of scalar equations.
const string & libs() const noexcept
The code libs (LIB_LIBS)
dynamicCodeContext & codeContext()
Access to the dynamic code context.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
bool changeKeyword(const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false)
Change the keyword for an entry,.
A class for handling character strings derived from std::string.
const SHA1 & sha1() const noexcept
The SHA1 calculated from options, libs, include, code, etc.
Base abstract class for handling finite volume options (i.e. fvOption).