mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: add notes to some (most) command-line options
- mapFields and splitMeshRegions need more clarification
This commit is contained in:
@ -22,7 +22,7 @@ License
|
||||
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Description
|
||||
Interrogates a case and prints information to screen
|
||||
Interrogates a case and prints information to stdout
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -38,15 +38,33 @@ using namespace Foam;
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
(
|
||||
"interrogates a case and prints information to stdout"
|
||||
);
|
||||
|
||||
argList::noBanner();
|
||||
argList::noParallel();
|
||||
argList::addBoolOption("times");
|
||||
argList::addOption("dictionary", "dictionary name");
|
||||
argList::addBoolOption("keywords");
|
||||
argList::addOption("entry", "entry name");
|
||||
argList::addBoolOption("times", "list available times");
|
||||
argList::addBoolOption
|
||||
(
|
||||
"keywords",
|
||||
"report keywords for the specified dictionary"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"dict",
|
||||
"file",
|
||||
"specify a dictionary to interrogate"
|
||||
);
|
||||
argList::addOption
|
||||
(
|
||||
"entry",
|
||||
"name",
|
||||
"report the named entry for the specified dictionary"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
|
||||
Info<< endl;
|
||||
#include "setRootCase.H"
|
||||
|
||||
if (args.optionFound("times"))
|
||||
{
|
||||
@ -61,11 +79,11 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (args.optionFound("dictionary"))
|
||||
if (args.optionFound("dict"))
|
||||
{
|
||||
fileName dictFileName
|
||||
const fileName dictFileName
|
||||
(
|
||||
args.rootPath()/args.caseName()/args["dictionary"]
|
||||
args.rootPath()/args.caseName()/args["dict"]
|
||||
);
|
||||
|
||||
IFstream dictFile(dictFileName);
|
||||
@ -74,14 +92,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
dictionary dict(dictFile);
|
||||
|
||||
if (args.optionFound("keywords") && !args.optionFound("entry"))
|
||||
{
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
{
|
||||
Info<< iter().keyword() << endl;
|
||||
}
|
||||
}
|
||||
else if (args.optionFound("entry"))
|
||||
if (args.optionFound("entry"))
|
||||
{
|
||||
wordList entryNames
|
||||
(
|
||||
@ -152,6 +163,13 @@ int main(int argc, char *argv[])
|
||||
FatalError.exit(2);
|
||||
}
|
||||
}
|
||||
else if (args.optionFound("keywords"))
|
||||
{
|
||||
forAllConstIter(dictionary, dict, iter)
|
||||
{
|
||||
Info<< iter().keyword() << endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Info<< dict;
|
||||
|
||||
Reference in New Issue
Block a user