35 {
"code",
"codeInclude"}
51 const dynamicCodeContext& context
54 dynCode.setFilterVariable(
"typeName", codeName());
57 dynCode.setFilterVariable(
"TemplateType", pTraits<Type>::typeName);
60 dynCode.addCompileFile(codeTemplateC(
"codedFunction2"));
63 dynCode.addCopyFile(codeTemplateH(
"codedFunction2"));
66 dynCode.setFilterVariable(
"verbose",
Foam::name(
bool(debug)));
70 Info<<
"compile " << codeName() <<
" sha1: " << context.sha1() <<
endl;
74 dynCode.setMakeOptions
78 +
"\n\nLIB_LIBS = \\\n"
104 redirectFunction2Ptr_ =
116 redirectFunction2Ptr_(cf2.redirectFunction2Ptr_, false)
144 units_.value.toStandard
146 redirectFunction2Ptr_->value
Run-time selectable function of two variables.
static autoPtr< Function2< Type > > New(const word &name, const Function2s::unitConversions &units, const dictionary &dict)
Select from dictionary.
Constructs a dynamically compiled function of two variables.
virtual tmp< Function2< Type > > clone() const
Construct and return a clone.
virtual void write(Ostream &os, const unitConversions &units) const
Write data to dictionary stream.
Coded(const word &name, const unitConversions &units, const dictionary &dict)
Construct from name and dictionary.
virtual ~Coded()
Destructor.
virtual Type value(const scalar x, const scalar y) const
Return value as a function of two scalars.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Base class for function objects and boundary conditions using dynamic code.
const word & codeName() const
Name of the dynamically generated CodedType.
void write(Ostream &os) const
Write the code for restart.
bool updateLibrary(const dictionary &dict) const
Update library from given updated dictionary as required.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
A class for managing temporary objects.
A class for handling words, derived from string.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const HashTable< unitConversion > & units()
Get the table of unit conversions.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.