Go to the documentation of this file.
36 #define DetailInfo if (::Foam::infoDetailLevel > 0) InfoErr
43 namespace functionEntries
50 primitiveEntryIstream,
62 const dictionary& parentDict,
68 <<
"Using #eval - line "
69 << is.lineNumber() <<
" in file " << parentDict.name() <<
nl;
80 <<
"Bad token - could not get string to evaluate"
88 s = tok.stringToken();
99 <<
"Invalid input for #eval" <<
nl
105 <<
"input: " <<
s <<
endl;
117 if (std::string::npos !=
s.find(
';'))
120 <<
"Invalid input for #eval" <<
nl
127 <<
"expanded: " <<
s <<
endl;
133 <<
"Empty #eval - line "
134 << is.lineNumber() <<
" in file " << parentDict.name() <<
nl;
139 expressions::exprResult result;
143 result = std::move(driver.result());
146 if (!result.hasValue() || !result.size())
149 <<
"Failed #eval - line "
150 << is.lineNumber() <<
" in file " << parentDict.name() <<
nl;
159 result.writeValue(toks);
161 return std::move(toks);
176 entry.append(std::move(toks),
true);
A keyword and a list of tokens is an 'entry'.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
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))
void inplaceTrim(std::string &s)
Trim leading and trailing whitespace inplace.
Ostream & endl(Ostream &os)
Add newline and flush stream.
messageStream InfoErr
Information stream (uses stderr - output is on the master only)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Macros for easy insertion into member function selection tables.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
addNamedToMemberFunctionSelectionTable(functionEntry, calcEntry, execute, dictionaryIstream, calc)
Begin block [isseparator].
errorManipArg< error, int > exit(error &err, const int errNo=1)
List< token > tokenList
List of tokens, used for a IOdictionary entry.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static bool execute(const dictionary &parentDict, primitiveEntry &thisEntry, Istream &is)
Execute in a primitiveEntry context.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
static void inplaceExpand(std::string &str, const dictionary &dict, const bool stripComments=true)
fieldExpr::parseDriver fieldExprDriver
Typedef for fieldExpr parseDriver.
string evaluate(const std::string &s, size_t pos=0, size_t len=std::string::npos)