mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +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:
@ -44,12 +44,14 @@ using namespace Foam;
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addOverwriteOption.H"
|
||||
|
||||
argList::noParallel();
|
||||
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");
|
||||
|
||||
@ -74,13 +74,16 @@ void collectFeatureEdges(const boundaryMesh& bMesh, labelList& markedEdges)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "addOverwriteOption.H"
|
||||
|
||||
argList::noParallel();
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
argList::addArgument("feature angle[0-180]");
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
Info<< "Mesh read in = "
|
||||
|
||||
@ -440,13 +440,16 @@ int main(int argc, char *argv[])
|
||||
"Makes internal faces into boundary faces.\n"
|
||||
"Does not duplicate points."
|
||||
);
|
||||
|
||||
#include "addDictOption.H"
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addDictOption.H"
|
||||
#include "addRegionOption.H"
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
|
||||
|
||||
@ -518,12 +518,14 @@ int main(int argc, char *argv[])
|
||||
"writeObj",
|
||||
"Write obj files showing the cyclic matching process"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
word meshRegionName = polyMesh::defaultRegion;
|
||||
args.readIfPresent("region", meshRegionName);
|
||||
const word meshRegionName =
|
||||
args.lookupOrDefault<word>("region", polyMesh::defaultRegion);
|
||||
|
||||
const bool overwrite = args.found("overwrite");
|
||||
|
||||
|
||||
@ -295,9 +295,10 @@ int main(int argc, char *argv[])
|
||||
"Topologically split duplicate surfaces"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
@ -170,10 +170,12 @@ int main(int argc, char *argv[])
|
||||
"Refine all cells"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
printEdgeStats(mesh);
|
||||
|
||||
@ -618,16 +618,17 @@ int main(int argc, char *argv[])
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addTimeOptions.H"
|
||||
#include "addDictOption.H"
|
||||
|
||||
argList::addBoolOption
|
||||
(
|
||||
"frontWidth",
|
||||
"Calculate the rms of the frontwidth"
|
||||
"Calculate the rms of the front-width"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
|
||||
// Force linker to include zoltan symbols. This section is only needed since
|
||||
@ -647,6 +648,7 @@ int main(int argc, char *argv[])
|
||||
runTime.setTime(Times[startTime], startTime);
|
||||
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const bool readDict = args.found("dict");
|
||||
|
||||
@ -114,6 +114,8 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name)
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::noParallel();
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
|
||||
argList::addArgument("faceSet");
|
||||
@ -122,8 +124,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createPolyMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
const word setName = args[1];
|
||||
|
||||
@ -1480,10 +1480,12 @@ int main(int argc, char *argv[])
|
||||
"Prefix region name to all patches, not just coupling patches"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
word blockedFacesName;
|
||||
|
||||
@ -111,6 +111,8 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
|
||||
argList::noParallel();
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "addOverwriteOption.H"
|
||||
#include "addRegionOption.H"
|
||||
#include "addDictOption.H"
|
||||
@ -194,7 +196,6 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
const word oldInstance = mesh.pointsInstance();
|
||||
|
||||
@ -366,9 +366,11 @@ int main(int argc, char *argv[])
|
||||
"time",
|
||||
"Specify a time for the resulting mesh"
|
||||
);
|
||||
|
||||
argList::noFunctionObjects(); // Never use function objects
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
runTime.functionObjects().off();
|
||||
|
||||
#include "createNamedMesh.H"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user