ENH: Function1 and PatchFunction1 improvements (#1917)

- easier support for non-mandatory functions.

  In some boundary conditions it can be desirable to support
  additional functions, but not necessarily require them. Make this
  easier to support with a Function1, PatchFunction1 NewIfPresent()
  selector.

- support for compatibility lookups

- harmonize branching logic and error handling between Function1 and
  PatchFunction1.

ENH: refactor a base class for Function1, PatchFunction1

- includes base characteristics, patch or scalar information

ENH: additional creation macros

- makeConcreteFunction1, makeConcretePatchFunction1Type for adding a
  non-templated function into the correct templated selection table.
  makeScalarPatchFunction1 for similarity with makeScalarFunction1
This commit is contained in:
Mark Olesen
2020-11-12 10:16:06 +01:00
parent 4b964f676e
commit 2f2dcdcf6f
58 changed files with 1295 additions and 648 deletions

View File

@ -99,27 +99,22 @@ class Function1Expression
mutable expressions::fieldExprDriver driver_;
// Private Member Functions
//- No copy assignment
void operator=(const Function1Expression<Type>&) = delete;
public:
//- Runtime type information
TypeName("expression");
// Generated Methods
//- No copy assignment
void operator=(const Function1Expression<Type>&) = delete;
// Constructors
//- Construct from patch, entry name and dictionary
// The patch must correspond to an fvPatch!
Function1Expression
(
const word& entryName,
const dictionary& dict
);
//- Construct from entry name and dictionary
Function1Expression(const word& entryName, const dictionary& dict);
//- Copy construct
explicit Function1Expression(const Function1Expression<Type>& rhs);