ENH: add Function1 constant() member

- marks if the value is considered to be independent of 'x'.
  Propagate into PatchFunction1 instead ad hoc checks there.

- adjust method name in PatchFunction1 to 'whichDb()' to reflect
  final changes in Function1 method names.

ENH: add a Function1 'none' placeholder function

- This is principally useful for interfaces that expect a Function1
  but where it is not necessarily used by a particular submodel.

TUT: update Function1 creation to use objectRegistry
This commit is contained in:
Mark Olesen
2021-11-26 15:06:12 +01:00
parent b96cef1339
commit f7c7fa94a3
24 changed files with 359 additions and 106 deletions

View File

@ -68,7 +68,10 @@ boundaryField
if (!baseVel)
{
baseVel = Function1<scalar>::New("timeFunction", dict);
baseVel = Function1<scalar>::New
(
"timeFunction", dict, &db()
);
}
const bool verbose = dict.getOrDefault<bool>("verbose", false);
@ -76,7 +79,10 @@ boundaryField
if (!baseDir && dict.found("directionFunction"))
{
// ie, NewIfPresent
baseDir = Function1<vector>::New("directionFunction", dict);
baseDir = Function1<vector>::New
(
"directionFunction", dict, &db()
);
InfoErr
<< "Function1 for direction" << nl;