mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: improved argList handling of libs, functionObjects
- include -no-libs option by default, similar to '-lib',
which makes it available to all solvers/utilities.
Add argList allowLibs() method to query it.
- relocate with/no functionObjects logic from Time to argList
itself as argList allowFunctionObjects()
- add libs/functionObjects override handling to decomposePar etc
ENH: report the stream relativeName for IOerrors (see c9333a5ac8)
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2020-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2020-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -65,8 +65,8 @@ int main(int argc, char *argv[])
|
||||
profiling::disable(); // No profiling output
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
argList::noFunctionObjects();
|
||||
argList::removeOption("case");
|
||||
argList::removeOption("noFunctionObjects");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"or",
|
||||
|
||||
@ -1014,7 +1014,9 @@ int main(int argc, char *argv[])
|
||||
Time::controlDictName,
|
||||
args.rootPath(),
|
||||
args.caseName()
|
||||
/ ("processor" + Foam::name(proci))
|
||||
/ ("processor" + Foam::name(proci)),
|
||||
args.allowFunctionObjects(),
|
||||
args.allowLibs()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -244,7 +244,9 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
Time::controlDictName,
|
||||
args.rootPath(),
|
||||
args.caseName()/("processor" + Foam::name(proci))
|
||||
args.caseName()/("processor" + Foam::name(proci)),
|
||||
args.allowFunctionObjects(),
|
||||
args.allowLibs()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -731,7 +731,9 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
Time::controlDictName,
|
||||
args.rootPath(),
|
||||
args.caseName()/("processor" + Foam::name(proci))
|
||||
args.caseName()/("processor" + Foam::name(proci)),
|
||||
args.allowFunctionObjects(),
|
||||
args.allowLibs()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -168,7 +168,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Less frequently used - reduce some clutter
|
||||
argList::setAdvanced("decomposeParDict");
|
||||
argList::setAdvanced("noFunctionObjects");
|
||||
|
||||
argList::addVerboseOption("Additional verbosity");
|
||||
|
||||
|
||||
@ -268,7 +268,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Less frequently used - reduce some clutter
|
||||
argList::setAdvanced("decomposeParDict");
|
||||
argList::setAdvanced("noFunctionObjects");
|
||||
|
||||
argList::addVerboseOption("Additional verbosity");
|
||||
|
||||
|
||||
@ -87,7 +87,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Less frequently used - reduce some clutter
|
||||
argList::setAdvanced("decomposeParDict");
|
||||
argList::setAdvanced("noFunctionObjects");
|
||||
|
||||
argList::addOption
|
||||
(
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2017-2020 OpenCFD Ltd.
|
||||
Copyright (C) 2017-2022 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -100,7 +100,9 @@ int main(int argc, char *argv[])
|
||||
(
|
||||
Time::controlDictName,
|
||||
args.rootPath(),
|
||||
args.caseName()/("processor" + Foam::name(proci))
|
||||
args.caseName()/("processor" + Foam::name(proci)),
|
||||
args.allowFunctionObjects(),
|
||||
args.allowLibs()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@ -56,6 +56,7 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Normally without functionObjects, with -withFunctionObjects to enable
|
||||
argList::noFunctionObjects(true);
|
||||
|
||||
// No -constant, no special treatment for 0/
|
||||
|
||||
@ -494,6 +494,7 @@ void evaluate
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// Normally without functionObjects, with -withFunctionObjects to enable
|
||||
argList::noFunctionObjects(true);
|
||||
|
||||
// No -constant, no special treatment for 0/
|
||||
@ -741,7 +742,7 @@ int main(int argc, char *argv[])
|
||||
);
|
||||
}
|
||||
|
||||
if (args.found("withFunctionObjects"))
|
||||
if (args.allowFunctionObjects())
|
||||
{
|
||||
runTime.functionObjects().start();
|
||||
}
|
||||
|
||||
@ -120,7 +120,6 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Less frequently used - reduce some clutter
|
||||
argList::setAdvanced("decomposeParDict");
|
||||
argList::setAdvanced("noFunctionObjects");
|
||||
|
||||
argList::addArgument("output", "The output surface file");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user