37 namespace functionEntries
64 const dictionary&
dict,
68 Info<<
"Expanding #calc at line " << is.lineNumber()
73 "functionEntries::calcEntry::execute(..)",
80 dictionary codeDict(
dict, dictionary());
85 if (t.isVerbatimString())
87 const verbatimString&
s = t.verbatimStringToken();
90 codeDict.add(
"code",
s);
92 else if (t.isString())
94 const string&
s = t.stringToken();
97 codeDict.add(
"code",
"os << (" +
s +
");");
102 <<
"Wrong string type for #calc" <<
nl
103 <<
" Expected either a string delimited by '\"...\"' "
104 "or a verbatim string delimited by '#{...#}' " <<
nl
105 <<
" found token " << t
109 codeStream::streamingFunctionType
function = codeStream::getFunction
116 OStringStream os(is.format());
117 (*function)(os,
dict);
Macros for easy insertion into member function selection tables.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const fileName & name() const
Return the dictionary name.
A list of keyword definitions, which are a keyword followed by any number of values (e....
static void checkSecurity(const char *title, const dictionary &)
Check security for creating dynamic code.
Compiles and executes code string expressions, returning the result to the dictionary entry.
static bool execute(dictionary &dict, Istream &)
Execute the functionEntry in a sub-dict context.
static void codeInclude(dictionary &codeDict)
Add the cached include file names to the codeInclude entry.
A functionEntry causes entries to be added/manipulated on the specified dictionary given an input str...
A keyword and a list of tokens is a 'primitiveEntry'. An primitiveEntry can be read,...
const dictionary & dict() const
This entry is not a dictionary,.
A class for handling character strings derived from std::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
defineTypeNameAndDebug(includeFvConstraintEntry, 0)
addToMemberFunctionSelectionTable(functionEntry, includeFvConstraintEntry, execute, dictionaryIstream)
void insert(const scalar, DynamicList< floatScalar > &)
Append scalar to given DynamicList.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & endl(Ostream &os)
Add newline and flush stream.