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);
Generic GeometricField class.
virtual void correct()
Solve the turbulence equations and correct the turbulence viscosity.
virtual bool read()
Re-read model coefficients if they have changed.
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
void setCodeContext(const dictionary &dict)
Set code context from a dictionary.
dynamicCodeContext & codeContext()
Access to the dynamic code context.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool changeKeyword(const keyType &oldKeyword, const keyType &newKeyword, bool overwrite=false)
Change the keyword for an entry,.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
A table of dynamically loaded libraries.
static dlLibraryTable & libs()
Table of global libraries.
Encapsulation of dynamic code dictionaries.
const string & libs() const noexcept
The code libs (LIB_LIBS)
const SHA1 & sha1() const noexcept
The SHA1 calculated from options, libs, include, code, etc.
const string & options() const noexcept
The code options (Make/options)
Tools for handling dynamic code compilation.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
void setMakeOptions(const std::string &content)
Define contents for Make/options.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
Mesh data needed to do the Finite Volume discretisation.
virtual void prepare(dynamicCode &, const dynamicCodeContext &) const
Adapt the context for the current object.
virtual void addSup(fvMatrix< Type > &eqn, const label fieldi)
Explicit/implicit matrix contributions.
virtual bool read(const dictionary &dict)
Read source dictionary.
virtual void constrain(fvMatrix< Type > &eqn, const label fieldi)
Set value.
virtual const dictionary & codeDict() const
Get the dictionary to initialize the code context.
fv::option & redirectOption() const
Dynamically compiled fvOption.
virtual void clearRedirect() const
Clear redirected object(s)
virtual dlLibraryTable & libs() const
Mutable access to the loaded dynamic libraries.
virtual string description() const
Description (type + name) for the output.
Intermediate abstract class for handling cell-set options for the derived fvOptions.
Base abstract class for handling finite volume options (i.e. fvOption).
void resetApplied()
Resize/reset applied flag list for all fieldNames_ entries.
A traits class, which is primarily used for primitives.
A class for handling character strings derived from std::string.
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.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.