openfoam/applications/utilities/preProcessing/mapFields/setRoots.H
Mark Olesen 58b7e64185 Use argList::addOption, argList::addBoolOption (almost) everywhere
- ensure that the standard options (eg, from timeSelector) also have
  some usage information
2009-12-03 13:32:12 +01:00

31 lines
947 B
C

argList::noParallel();
argList::validArgs.clear();
argList::validArgs.append("source dir");
argList::addOption("sourceTime", "scalar");
argList::addBoolOption("parallelSource");
argList::addBoolOption("parallelTarget");
argList::addBoolOption("consistent");
argList args(argc, argv);
if (!args.check())
{
FatalError.exit();
}
fileName rootDirTarget(args.rootPath());
fileName caseDirTarget(args.globalCaseName());
fileName casePath(args.additionalArgs()[0]);
fileName rootDirSource = casePath.path();
fileName caseDirSource = casePath.name();
Info<< "Source: " << rootDirSource << " " << caseDirSource << nl
<< "Target: " << rootDirTarget << " " << caseDirTarget << endl;
bool parallelSource = args.optionFound("parallelSource");
bool parallelTarget = args.optionFound("parallelTarget");
bool consistent = args.optionFound("consistent");