ENH: improve handling of noFunctionObjects / withFunctionObjects (issue #352)

- do not enable function objects by default if there is no means of
  disabling them.
This commit is contained in:
Mark Olesen 2017-03-07 10:53:40 +01:00
parent cb38533096
commit 4b93333292

View File

@ -515,7 +515,9 @@ Foam::Time::Time
*this,
argList::validOptions.found("withFunctionObjects")
? args.optionFound("withFunctionObjects")
: !args.optionFound("noFunctionObjects")
: argList::validOptions.found("noFunctionObjects")
? !args.optionFound("noFunctionObjects")
: false
)
{
libs_.open(controlDict_, "libs");
@ -590,7 +592,6 @@ Foam::Time::Time
{
libs_.open(controlDict_, "libs");
// Explicitly set read flags on objectRegistry so anything constructed
// from it reads as well (e.g. fvSolution).
readOpt() = IOobject::MUST_READ_IF_MODIFIED;