ENH: rationalize expression string reading

- read construct from dictionary.
  Calling syntax similar to dimensionedType, dimensionedSet,...

  Replaces the older getEntry(), getOptional() static methods

- support readIfPresent
This commit is contained in:
Mark Olesen
2022-09-28 09:24:46 +02:00
parent 3a6e427409
commit ee9119f436
25 changed files with 218 additions and 261 deletions

View File

@ -377,7 +377,7 @@ bool Foam::functionObjects::fvExpressionField::read(const dictionary& dict)
case actionType::opModify:
{
// Optional <fieldMask> for modify
maskExpr_.readEntry("fieldMask", dict, false);
maskExpr_.readIfPresent("fieldMask", dict);
[[fallthrough]];
}
case actionType::opNew: