35 return {
"code",
"codeInclude"};
42 return {word::null, word::null};
50 const dynamicCodeContext& context
53 dynCode.setFilterVariable(
"typeName", codeName());
56 dynCode.setFilterVariable(
"TemplateType", pTraits<Type>::typeName);
59 dynCode.addCompileFile(codeTemplateC(
"codedFunction1"));
62 dynCode.addCopyFile(codeTemplateH(
"codedFunction1"));
65 dynCode.setFilterVariable(
"verbose",
Foam::name(
bool(debug)));
69 Info<<
"compile " << codeName() <<
" sha1: " << context.sha1() <<
endl;
73 dynCode.setMakeOptions
77 +
"\n\nLIB_LIBS = \\\n"
88 redirectFunction1Ptr_.clear();
96 this->updateLibrary();
98 dictionary redirectDict(codeDict());
99 redirectDict.set(codeName(), codeName());
119 redirectFunction1Ptr_ = compileNew();
131 redirectFunction1Ptr_ = compileNew();
158 units_.value.toStandard
160 redirectFunction1Ptr_->value
Run-time selectable general function of one variable.
Constructs a dynamically compiled Function1.
virtual Type integral(const scalar x1, const scalar x2) const
Integrate between two scalars.
virtual void write(Ostream &os, const unitConversions &units) const
Write data to dictionary stream.
virtual ~Coded()
Destructor.
virtual Type value(const scalar x) const
Return value as a function of a scalar.
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
Coded(const word &name, const Function1s::unitConversions &units, const dictionary &dict)
Construct from name and dictionary.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Base class for function objects and boundary conditions using dynamic code.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Traits class for primitives.
A class for managing temporary objects.
A class for handling words, derived from string.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
autoPtr< CompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const viscosity &viscosity)
const unitConversion unitAny
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
const HashTable< unitConversion > & units()
Get the table of unit conversions.