Commit f721b534 authored by Mark Olesen's avatar Mark Olesen

ENH: report dictionary name actually used (for -dict option)

parent 31b17221
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -42,12 +42,7 @@ int main(int argc, char *argv[]) ...@@ -42,12 +42,7 @@ int main(int argc, char *argv[])
{ {
argList::noParallel(); argList::noParallel();
argList::noFunctionObjects(); argList::noFunctionObjects();
argList::addOption argList::addOption("dict", "file", "Alternative PDRblockMeshDict");
(
"dict",
"file",
"Alternative dictionary for the PDRblockMesh description"
);
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
...@@ -56,7 +51,7 @@ int main(int argc, char *argv[]) ...@@ -56,7 +51,7 @@ int main(int argc, char *argv[])
#include "setSystemRunTimeDictionaryIO.H" #include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl; Info<< "Reading " << dictIO.name() << nl << endl;
IOdictionary meshDict(dictIO); IOdictionary meshDict(dictIO);
......
...@@ -116,11 +116,16 @@ int main(int argc, char *argv[]) ...@@ -116,11 +116,16 @@ int main(int argc, char *argv[])
"geometry scaling factor" "geometry scaling factor"
); );
#include "addDictOption.H" argList::addOption
(
"dict",
"file",
"Dictionary of intersect options"
);
argList::addNote argList::addNote
( (
"test intersect of two surfaces. Writes obj file" "Test intersect of two surfaces. Writes obj file"
); );
argList::noParallel(); argList::noParallel();
argList::noFunctionObjects(); argList::noFunctionObjects();
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -84,7 +85,7 @@ int main(int argc, char *argv[]) ...@@ -84,7 +85,7 @@ int main(int argc, char *argv[])
"Collapse faces that are in the supplied face set" "Collapse faces that are in the supplied face set"
); );
argList::addOption("dict", "file", "Use alternative collapseDict"); argList::addOption("dict", "file", "Alternative collapseDict");
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
...@@ -102,7 +103,7 @@ int main(int argc, char *argv[]) ...@@ -102,7 +103,7 @@ int main(int argc, char *argv[])
const word dictName("collapseDict"); const word dictName("collapseDict");
#include "setSystemMeshDictionaryIO.H" #include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl; Info<< "Reading " << dictIO.name() << nl << endl;
IOdictionary collapseDict(dictIO); IOdictionary collapseDict(dictIO);
......
...@@ -339,7 +339,7 @@ int main(int argc, char *argv[]) ...@@ -339,7 +339,7 @@ int main(int argc, char *argv[])
"For example, moving points, splitting/collapsing edges etc." "For example, moving points, splitting/collapsing edges etc."
); );
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
argList::addOption("dict", "file", "Use alternative modifyMeshDict"); argList::addOption("dict", "file", "Alternative modifyMeshDict");
argList::noFunctionObjects(); // Never use function objects argList::noFunctionObjects(); // Never use function objects
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -95,12 +95,7 @@ int main(int argc, char *argv[]) ...@@ -95,12 +95,7 @@ int main(int argc, char *argv[])
"noClean", "noClean",
"Do not remove any existing polyMesh/ directory or files" "Do not remove any existing polyMesh/ directory or files"
); );
argList::addOption argList::addOption("dict", "file", "Alternative PDRblockMeshDict");
(
"dict",
"file",
"Alternative dictionary for the PDRblockMesh description"
);
argList::addOption argList::addOption
( (
"time", "time",
......
...@@ -134,12 +134,7 @@ int main(int argc, char *argv[]) ...@@ -134,12 +134,7 @@ int main(int argc, char *argv[])
"noClean", "noClean",
"Do not remove any existing polyMesh/ directory or files" "Do not remove any existing polyMesh/ directory or files"
); );
argList::addOption argList::addOption("dict", "file", "Alternative blockMeshDict");
(
"dict",
"file",
"Alternative dictionary for the blockMesh description"
);
argList::addBoolOption argList::addBoolOption
( (
"sets", "sets",
......
...@@ -218,7 +218,7 @@ int main(int argc, char *argv[]) ...@@ -218,7 +218,7 @@ int main(int argc, char *argv[])
); );
#include "addRegionOption.H" #include "addRegionOption.H"
argList::addOption("dict", "file", "Use alternative extrudeMeshDict"); argList::addOption("dict", "file", "Alternative extrudeMeshDict");
#include "setRootCase.H" #include "setRootCase.H"
#include "createTimeExtruded.H" #include "createTimeExtruded.H"
......
...@@ -1428,7 +1428,7 @@ int main(int argc, char *argv[]) ...@@ -1428,7 +1428,7 @@ int main(int argc, char *argv[])
argList::addOption argList::addOption
( (
"dict", "file", "Use alternative extrudeToRegionMeshDict" "dict", "file", "Alternative extrudeToRegionMeshDict"
); );
#include "setRootCase.H" #include "setRootCase.H"
......
...@@ -779,7 +779,7 @@ int main(int argc, char *argv[]) ...@@ -779,7 +779,7 @@ int main(int argc, char *argv[])
"file", "file",
"Name of the file to save the simplified surface to" "Name of the file to save the simplified surface to"
); );
argList::addOption("dict", "file", "Use alternative snappyHexMeshDict"); argList::addOption("dict", "file", "Alternative snappyHexMeshDict");
argList::noFunctionObjects(); // Never use function objects argList::noFunctionObjects(); // Never use function objects
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2018 OpenCFD Ltd. Copyright (C) 2016-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -444,7 +444,7 @@ int main(int argc, char *argv[]) ...@@ -444,7 +444,7 @@ int main(int argc, char *argv[])
"Does not duplicate points." "Does not duplicate points."
); );
argList::addOption("dict", "file", "Use alternative createBafflesDict"); argList::addOption("dict", "file", "Alternative createBafflesDict");
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addRegionOption.H" #include "addRegionOption.H"
...@@ -468,7 +468,7 @@ int main(int argc, char *argv[]) ...@@ -468,7 +468,7 @@ int main(int argc, char *argv[])
PtrList<faceSelection> selectors; PtrList<faceSelection> selectors;
{ {
Info<< "Reading baffle criteria from " << dictName << nl << endl; Info<< "Reading baffle criteria from " << dictIO.name() << nl << endl;
IOdictionary dict(dictIO); IOdictionary dict(dictIO);
internalFacesOnly = dict.get<bool>("internalFacesOnly"); internalFacesOnly = dict.get<bool>("internalFacesOnly");
......
...@@ -521,7 +521,7 @@ int main(int argc, char *argv[]) ...@@ -521,7 +521,7 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addRegionOption.H" #include "addRegionOption.H"
argList::addOption("dict", "file", "Use alternative createPatchDict"); argList::addOption("dict", "file", "Alternative createPatchDict");
argList::addBoolOption argList::addBoolOption
( (
"writeObj", "writeObj",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2018 OpenCFD Ltd. Copyright (C) 2016-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -286,7 +286,12 @@ int main(int argc, char *argv[]) ...@@ -286,7 +286,12 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addRegionOption.H" #include "addRegionOption.H"
#include "addDictOption.H" argList::addBoolOption
(
"dict",
"file",
"Specify a dictionary to read actions from"
);
argList::addBoolOption argList::addBoolOption
( (
"detectOnly", "detectOnly",
...@@ -330,7 +335,7 @@ int main(int argc, char *argv[]) ...@@ -330,7 +335,7 @@ int main(int argc, char *argv[])
const word dictName; const word dictName;
#include "setSystemMeshDictionaryIO.H" #include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl; Info<< "Reading " << dictIO.name() << nl << endl;
IOdictionary dict(dictIO); IOdictionary dict(dictIO);
if (dict.found("detect")) if (dict.found("detect"))
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018 OpenCFD Ltd. Copyright (C) 2018-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -52,7 +52,7 @@ int main(int argc, char *argv[]) ...@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
"Mirrors a mesh around a given plane." "Mirrors a mesh around a given plane."
); );
argList::addOption("dict", "file", "Use alternative mirrorMeshDict"); argList::addOption("dict", "file", "Alternative mirrorMeshDict");
argList::setAdvanced("decomposeParDict"); argList::setAdvanced("decomposeParDict");
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
...@@ -65,7 +65,7 @@ int main(int argc, char *argv[]) ...@@ -65,7 +65,7 @@ int main(int argc, char *argv[])
#include "setSystemRunTimeDictionaryIO.H" #include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl; Info<< "Reading " << dictIO.name() << nl << endl;
const IOdictionary mirrorDict(dictIO); const IOdictionary mirrorDict(dictIO);
......
...@@ -166,7 +166,7 @@ int main(int argc, char *argv[]) ...@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addRegionOption.H" #include "addRegionOption.H"
argList::addOption("dict", "file", "Use alternative refineMeshDict"); argList::addOption("dict", "file", "Alternative refineMeshDict");
argList::addBoolOption argList::addBoolOption
( (
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd. Copyright (C) 2016-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -618,7 +618,7 @@ int main(int argc, char *argv[]) ...@@ -618,7 +618,7 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addTimeOptions.H" #include "addTimeOptions.H"
argList::addOption("dict", "file", "Use alternative renumberMeshDict"); argList::addOption("dict", "file", "Alternative renumberMeshDict");
argList::addBoolOption argList::addBoolOption
( (
...@@ -707,7 +707,7 @@ int main(int argc, char *argv[]) ...@@ -707,7 +707,7 @@ int main(int argc, char *argv[])
const word dictName("renumberMeshDict"); const word dictName("renumberMeshDict");
#include "setSystemMeshDictionaryIO.H" #include "setSystemMeshDictionaryIO.H"
Info<< "Renumber according to " << dictName << nl << endl; Info<< "Renumber according to " << dictIO.name() << nl << endl;
renumberDictPtr.reset(new IOdictionary(dictIO)); renumberDictPtr.reset(new IOdictionary(dictIO));
const IOdictionary& renumberDict = renumberDictPtr(); const IOdictionary& renumberDict = renumberDictPtr();
......
...@@ -119,7 +119,7 @@ int main(int argc, char *argv[]) ...@@ -119,7 +119,7 @@ int main(int argc, char *argv[])
#include "addOverwriteOption.H" #include "addOverwriteOption.H"
#include "addRegionOption.H" #include "addRegionOption.H"
argList::addOption("dict", "file", "Use alternative stitchMeshDict"); argList::addOption("dict", "file", "Alternative stitchMeshDict");
argList::addBoolOption argList::addBoolOption
( (
...@@ -296,7 +296,7 @@ int main(int argc, char *argv[]) ...@@ -296,7 +296,7 @@ int main(int argc, char *argv[])
#include "setSystemRunTimeDictionaryIO.H" #include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName; Info<< "Reading " << dictIO.name() << flush;
IOdictionary stitchDict(dictIO); IOdictionary stitchDict(dictIO);
......
...@@ -211,7 +211,7 @@ int main(int argc, char *argv[]) ...@@ -211,7 +211,7 @@ int main(int argc, char *argv[])
timeSelector::addOptions(true, false); // constant(true), zero(false) timeSelector::addOptions(true, false); // constant(true), zero(false)
argList::addOption("dict", "file", "Use alternative topoSetDict"); argList::addOption("dict", "file", "Alternative topoSetDict");
#include "addRegionOption.H" #include "addRegionOption.H"
argList::addBoolOption argList::addBoolOption
...@@ -232,7 +232,7 @@ int main(int argc, char *argv[]) ...@@ -232,7 +232,7 @@ int main(int argc, char *argv[])
const word dictName("topoSetDict"); const word dictName("topoSetDict");
#include "setSystemMeshDictionaryIO.H" #include "setSystemMeshDictionaryIO.H"
Info<< "Reading " << dictName << nl << endl; Info<< "Reading " << dictIO.name() << nl << endl;
IOdictionary topoSetDict(dictIO); IOdictionary topoSetDict(dictIO);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2015 OpenFOAM Foundation Copyright (C) 2011-2015 OpenFOAM Foundation
Copyright (C) 2016-2017 OpenCFD Ltd. Copyright (C) 2016-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -112,7 +112,7 @@ int main(int argc, char *argv[]) ...@@ -112,7 +112,7 @@ int main(int argc, char *argv[])
argList::noCheckProcessorDirectories(); argList::noCheckProcessorDirectories();
argList::addOption("dict", "file", "Use alternative noiseDict"); argList::addOption("dict", "file", "Alternative noiseDict");
#include "setRootCase.H" #include "setRootCase.H"
#include "createTime.H" #include "createTime.H"
...@@ -120,7 +120,7 @@ int main(int argc, char *argv[]) ...@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
const word dictName("noiseDict"); const word dictName("noiseDict");
#include "setSystemRunTimeDictionaryIO.H" #include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl; Info<< "Reading " << dictIO.name() << nl << endl;
IOdictionary dict(dictIO); IOdictionary dict(dictIO);
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2016 Shell Research Ltd. Copyright (C) 2016 Shell Research Ltd.
Copyright (C) 2019 OpenCFD Ltd. Copyright (C) 2019-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -66,7 +66,7 @@ int main(int argc, char* argv[]) ...@@ -66,7 +66,7 @@ int main(int argc, char* argv[])
"Specify a time" "Specify a time"
); );
argList::addOption("dict", "file", "Use alternative PDRsetFieldsDict"); argList::addOption("dict", "file", "Alternative PDRsetFieldsDict");
argList::addBoolOption argList::addBoolOption
( (
...@@ -86,7 +86,7 @@ int main(int argc, char* argv[]) ...@@ -86,7 +86,7 @@ int main(int argc, char* argv[])
const word dictName("PDRsetFieldsDict"); const word dictName("PDRsetFieldsDict");
#include "setSystemRunTimeDictionaryIO.H" #include "setSystemRunTimeDictionaryIO.H"
Info<< "Reading " << dictName << "\n" << endl; Info<< "Reading " << dictIO.name() << nl << endl;
IOdictionary setFieldsDict(dictIO); IOdictionary setFieldsDict(dictIO);
......
...@@ -399,7 +399,7 @@ int main(int argc, char *argv[]) ...@@ -399,7 +399,7 @@ int main(int argc, char *argv[])
" (such as the patch type for fields and polyMesh/boundary files)." " (such as the patch type for fields and polyMesh/boundary files)."
); );
argList::addOption("dict", "file", "Use alternative changeDictionaryDict"); argList::addOption("dict", "file", "Alternative changeDictionaryDict");
argList::addOption argList::addOption
( (
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2016 OpenCFD Ltd. Copyright (C) 2016-2020 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
...@@ -62,7 +62,7 @@ int main(int argc, char *argv[]) ...@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
" algorithm. Writes a map of fine to coarse grid." " algorithm. Writes a map of fine to coarse grid."
); );
argList::addOption("dict", "file", "Use alternative viewFactorsDict"); argList::addOption("dict", "file", "Alternative viewFactorsDict");