47 const dynamicCodeContext& context
50 dynCode.setFilterVariable(
"typeName", codeName());
53 dynCode.setFilterVariable(
"TemplateType", pTraits<Type>::typeName);
56 dynCode.addCompileFile(codeTemplateC(
"codedFunction1"));
59 dynCode.addCopyFile(codeTemplateH(
"codedFunction1"));
64 dynCode.setFilterVariable(
"verbose",
"true");
65 Info<<
"compile " << codeName() <<
" sha1: " 66 << context.sha1() <<
endl;
70 dynCode.setMakeOptions
74 +
"\n\nLIB_LIBS = \\\n" 85 redirectFunction1Ptr_.clear();
93 this->updateLibrary();
95 dictionary redirectDict(codeDict());
96 redirectDict.set(codeName(), codeName());
114 redirectFunction1Ptr_ = compileNew();
125 redirectFunction1Ptr_ = compileNew();
151 return redirectFunction1Ptr_->value(x);
Run-time selectable general function of one variable.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual Type integral(const scalar x1, const scalar x2) const
Integrate between two scalars.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Constructs a dynamically compiled Function1.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Traits class for primitives.
virtual ~Coded()
Destructor.
virtual tmp< Function1< Type > > clone() const
Construct and return a clone.
virtual void write(Ostream &os) const
Write data to dictionary stream.
autoPtr< BasicCompressibleMomentumTransportModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleMomentumTransportModel::transportModel &transport)
A class for handling words, derived from string.
Base class for function objects and boundary conditions using dynamic code.
virtual void writeCode(Ostream &os) const
An Ostream is an abstract base class for all output systems (streams, files, token lists...
word name(const complex &)
Return a string representation of a complex.
Coded(const word &name, const dictionary &dict)
Construct from name and dictionary.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
virtual Type value(const scalar x) const
Return value as a function of a scalar.
A class for managing temporary objects.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.