38 void Foam::expressions::patchExprFieldBase::readExpressions
40 const dictionary&
dict,
41 enum expectedTypes expectedType,
54 if (expectedTypes::VALUE_TYPE == expectedType)
59 else if (expectedTypes::GRADIENT_TYPE == expectedType)
73 if (evalValue && evalGrad)
92 <<
"Entries 'valueExpr' and 'gradientExpr' " 93 "(mixed-conditon) not found in dictionary " 102 Info<<
"Mixed with no valueExpr" <<
nl;
106 Info<<
"Mixed with no gradientExpr" <<
nl;
118 evalOnConstruct_(false),
128 enum expectedTypes expectedType,
132 debug_(
dict.getOrDefault(
"debug", false)),
133 evalOnConstruct_(
dict.getOrDefault(
"evalOnConstruct", false)),
138 readExpressions(
dict, expectedType, wantPointData);
146 os.writeEntryIfDifferent<
bool>(
"evalOnConstruct",
false, evalOnConstruct_);
151 valueExpr_.writeEntry(
"valueExpr",
os,
false);
152 gradExpr_.writeEntry(
"gradientExpr",
os,
false);
153 fracExpr_.writeEntry(
"fractionExpr",
os,
false);
expressions::exprString gradExpr_
bool readEntry(const word &keyword, const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::MUST_READ)
Read/expand entry with dictionary variables, and strip any embedded C/C++ comments from the input...
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
constexpr char nl
The newline '\n' character (0x0a)
patchExprFieldBase()
Default construct.
bool readIfPresent(const word &keyword, const dictionary &dict)
Read/expand optional entry with dictionary variables, and strip any embedded C/C++ comments from the ...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
expressions::exprString valueExpr_
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
messageStream Info
Information stream (stdout output on master, null elsewhere)
expressions::exprString fracExpr_
bool debug_
Add debugging.
void write(Ostream &os) const
Write.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...