STYLE: add notes to some (most) command-line options

- mapFields and splitMeshRegions need more clarification
This commit is contained in:
Mark Olesen
2010-04-27 10:50:15 +02:00
parent 5debfe4cdf
commit 147fa2a75d
85 changed files with 1221 additions and 472 deletions

View File

@ -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;