mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: add -verbose support into argList
- similar to -dry-run handling, can be interrogated from argList,
which makes it simpler to add into utilities.
- support multiple uses of -dry-run and -verbose to increase the
level. For example, could have
someApplication -verbose -verbose
and inside of the application:
if (args.verbose() > 2) ...
BUG: error with empty distributed roots specification (fixes #2196)
- previously used the size of distributed roots to transmit if the
case was running in distributed mode, but this behaves rather poorly
with bad input. Specifically, the following questionable setup:
distributed true;
roots ( /*none*/ );
Now transmit the ParRunControl distributed() value instead,
and also emit a gentle warning for the user:
WARNING: running distributed but did not specify roots!
This commit is contained in:
@ -330,9 +330,8 @@ int main(int argc, char *argv[])
|
||||
"Test without writing the decomposition. "
|
||||
"Changes -cellDist to only write VTK output."
|
||||
);
|
||||
argList::addBoolOption
|
||||
argList::addVerboseOption
|
||||
(
|
||||
"verbose",
|
||||
"Additional verbosity"
|
||||
);
|
||||
argList::addOption
|
||||
@ -409,9 +408,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "setRootCase.H"
|
||||
|
||||
const bool dryrun = args.dryRun();
|
||||
const bool writeCellDist = args.found("cellDist");
|
||||
const bool verbose = args.found("verbose");
|
||||
|
||||
// Most of these are ignored for dry-run (not triggered anywhere)
|
||||
const bool copyZero = args.found("copyZero");
|
||||
@ -432,7 +429,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Allow override of time (unless dry-run)
|
||||
instantList times;
|
||||
if (dryrun)
|
||||
if (args.dryRun())
|
||||
{
|
||||
Info<< "\ndry-run: ignoring -copy*, -fields, -force, time selection"
|
||||
<< nl;
|
||||
@ -477,7 +474,7 @@ int main(int argc, char *argv[])
|
||||
regionName == polyMesh::defaultRegion ? word::null : regionName
|
||||
);
|
||||
|
||||
if (dryrun)
|
||||
if (args.dryRun())
|
||||
{
|
||||
Info<< "dry-run: decomposing mesh " << regionName << nl << nl
|
||||
<< "Create mesh..." << flush;
|
||||
@ -498,7 +495,7 @@ int main(int argc, char *argv[])
|
||||
args.getOrDefault<word>("method", word::null)
|
||||
);
|
||||
|
||||
decompTest.execute(writeCellDist, verbose);
|
||||
decompTest.execute(writeCellDist, args.verbose());
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user