39namespace functionEntries
55 primitiveEntryIstream,
66 const dictionary& parentDict,
71 <<
"Using #calc - line "
72 << is.lineNumber() <<
" in file "
73 << parentDict.relativeName() <<
nl;
77 "functionEntries::calcEntry::evaluate(..)",
85 dictionary codeSubDict;
86 codeSubDict.add(
"code",
"os << (" +
s +
");");
87 dictionary codeDict(parentDict, codeSubDict);
90 OStringStream
os(is.format());
93 (*function)(
os, parentDict);
110 entry.read(parentDict, result);
123 parentDict.
read(result);
Macros for easy insertion into member function selection tables.
#define addNamedToMemberFunctionSelectionTable(baseType, thisType, funcName, argNames, lookupName)
Add to hash-table of functions with 'lookupName' as the key.
void evaluate()
Evaluate boundary conditions.
Input from string buffer, using a ISstream. Always UNCOMPRESSED.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool read(Istream &is)
Read dictionary from Istream. Discards the header.
static void checkSecurity(const char *title, const dictionary &)
Check security for creating dynamic code.
A keyword and a list of tokens is an 'entry'.
Uses dynamic compilation to provide calculating functionality for entering dictionary entries.
static streamingFunctionType getFunction(const dictionary &parentDict, const dictionary &codeDict)
Construct, compile, load and return streaming function.
void(* streamingFunctionType)(Ostream &, const dictionary &)
Interpreter function type.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
virtual bool execute()
Calculate the output fields.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
A class for handling character strings derived from std::string.
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
constexpr char nl
The newline '\n' character (0x0a)