mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: ignore -noFunctionObjects option when disabled
- With argList::noFunctionObjects() we use the logic added in
4b93333292 (issue #352)
By removing the '-noFunctionObjects' option, we automatically
suppress the creation of function-objects via Time (with argList
as a parameter).
There is generally no need in these cases for an additional
runTime.functionObjects().off() statement
Use the argList::noFunctionObjects() for more direct configuration
and reduce unnecessary clutter in the -help information.
In previous versions, the -noFunctionObjects would have been redundant
anyhow, so we can also just ignore it now instead.
This commit is contained in:
@ -623,9 +623,11 @@ label findPatch(const polyBoundaryMesh& patches, const word& patchName)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addOverwriteOption.H"
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
// Read control dictionary
|
||||
|
||||
@ -85,10 +85,12 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "addDictOption.H"
|
||||
#include "addOverwriteOption.H"
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
runTime.functionObjects().off();
|
||||
instantList timeDirs = timeSelector::selectIfPresent(runTime, args);
|
||||
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
@ -358,10 +358,12 @@ int main(int argc, char *argv[])
|
||||
"Read user-defined mesh quality criterions from system/meshQualityDict"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const scalar featureAngle = args.read<scalar>(1);
|
||||
|
||||
@ -339,10 +339,12 @@ int main(int argc, char *argv[])
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addDictOption.H"
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const bool overwrite = args.found("overwrite");
|
||||
|
||||
@ -66,10 +66,12 @@ int main(int argc, char *argv[])
|
||||
" (default is to extend set)"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
word cellSetName(args[1]);
|
||||
|
||||
@ -72,12 +72,12 @@ int main(int argc, char *argv[])
|
||||
"Restrict cells to refine based on specified cellSet name"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
// Find set of patches from the list of regular expressions provided
|
||||
|
||||
@ -56,10 +56,12 @@ int main(int argc, char *argv[])
|
||||
#include "addOverwriteOption.H"
|
||||
argList::addArgument("faceSet");
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const word setName = args[1];
|
||||
|
||||
@ -548,10 +548,12 @@ int main(int argc, char *argv[])
|
||||
"Edge snap tolerance (default 0.2)"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const scalar featureAngle = args.read<scalar>(1);
|
||||
|
||||
Reference in New Issue
Block a user