Go to the documentation of this file.
55 bool Foam::argList::argsMandatory_ =
true;
56 bool Foam::argList::checkProcessorDirectories_ =
true;
73 Foam::argList::initValidTables::initValidTables()
79 "Specify case directory to use (instead of the cwd)"
85 "Additional library or library list to load"
86 " (can be used multiple times)",
94 "Specify the value of a registered debug switch."
95 " Default is 1 if the value is omitted."
96 " (Can be used multiple times)",
104 "Specify the value of a registered info switch."
105 " Default is 1 if the value is omitted."
106 " (Can be used multiple times)",
114 "Specify the value of a registered optimisation switch (int/bool)."
115 " Default is 1 if the value is omitted."
116 " (Can be used multiple times)",
120 argList::addBoolOption(
"parallel",
"Run in parallel");
121 validParOptions.set(
"parallel",
"");
126 "Slave root directories for distributed running",
139 "Use specified file for decomposePar dictionary"
144 "((host1 dir1) .. (hostN dirN))",
145 "Per-host slave root directories for distributed running."
146 " The host specification can be a regex.",
152 "((host1 dir1) .. (hostN dirN))"
155 argList::addBoolOption
158 "Do not execute function objects",
166 "Override the file handler type",
176 Pstream::addValidParOptions(validParOptions);
191 static inline constexpr
bool shouldWarnVersion(
const int version)
210 Info<<
"Hosts :" <<
nl <<
"(" <<
nl;
215 for (
const auto& str : slaveProcs)
217 std::string curr(str.substr(0, str.rfind(
'.')));
224 Info<<
" (" << prev.c_str() <<
" " <<
count <<
")" <<
nl;
228 prev = std::move(curr);
236 Info<<
" (" << prev.c_str() <<
" " <<
count <<
")" <<
nl;
247 void Foam::argList::checkITstream(
const ITstream& is,
const label index)
249 const label remaining = is.nRemainingTokens();
255 <<
"--> FOAM WARNING:" <<
nl
256 <<
"Argument " << index <<
" has "
257 << remaining <<
" excess tokens" <<
nl <<
nl;
263 <<
"--> FOAM WARNING:" <<
nl
264 <<
"Argument " << index <<
" had no tokens" <<
nl <<
nl;
269 void Foam::argList::checkITstream(
const ITstream& is,
const word& optName)
271 const label remaining = is.nRemainingTokens();
277 <<
"--> FOAM WARNING:" <<
nl
278 <<
"Option -" << optName <<
" has "
279 << remaining <<
" excess tokens" <<
nl <<
nl;
285 <<
"--> FOAM WARNING:" <<
nl
286 <<
"Option -" << optName <<
" had no tokens" <<
nl <<
nl;
293 const string& argName,
297 validArgs.append(argName);
301 const label index = validArgs.size();
305 argUsage.erase(index);
309 argUsage.set(index, usage);
321 addOption(optName,
"", usage, advanced);
333 validOptions.set(optName, param);
336 optionUsage.set(optName, usage);
340 advancedOptions.set(optName);
347 if (advanced && validOptions.found(optName))
349 advancedOptions.set(optName);
353 advancedOptions.erase(optName);
361 std::pair<const char*,int> compat
364 validOptionsCompat.insert
367 std::pair<word,int>(optName, compat.second)
374 std::pair<const char*,int> compat,
378 ignoreOptionsCompat.insert
381 std::pair<bool,int>(expectArg, compat.second)
394 optionUsage.erase(optName);
398 optionUsage.set(optName, usage);
414 validOptions.erase(optName);
415 optionUsage.erase(optName);
416 advancedOptions.erase(optName);
422 argsMandatory_ =
false;
428 return argsMandatory_;
446 removeOption(
"noFunctionObjects");
450 ignoreOptionCompat({
"noFunctionObjects", 0},
false);
456 "withFunctionObjects",
457 "Execute functionObjects",
475 "Disable use of the controlDict libs entry",
483 removeOption(
"parallel");
484 removeOption(
"roots");
485 removeOption(
"decomposeParDict");
486 removeOption(
"hostRoots");
487 validParOptions.clear();
493 checkProcessorDirectories_ =
false;
499 for (
int i=1; i<argc; ++i)
501 if (argv[i] ==
'-' + postProcessOptionName)
526 if (!validOptionsCompat.empty())
528 const auto fnd = validOptionsCompat.cfind(optName.substr(1));
532 const auto& iter = *fnd;
534 if (shouldWarnVersion(iter.second))
537 <<
"--> FOAM IOWarning :" <<
nl
538 <<
" Found [v" << iter.second <<
"] '"
539 << optName <<
"' instead of '-"
540 << iter.first <<
"' option"
547 return "-" + iter.first;
556 int Foam::argList::optionIgnore(
const word& optName)
560 if (!ignoreOptionsCompat.empty())
562 const auto fnd = ignoreOptionsCompat.cfind(optName);
566 const auto& iter = *fnd;
570 const int nskip = (iter.first ? 2 : 1);
572 if (shouldWarnVersion(iter.second))
575 <<
"--> FOAM IOWarning :" <<
nl
576 <<
" Ignoring [v" << iter.second <<
"] '-"
577 << optName << (nskip > 1 ?
" ARG" :
"")
593 bool Foam::argList::regroupArgv(
int& argc,
char**& argv)
603 args_[0] = fileName(argv[0]);
604 for (
int argi = 1; argi < argc; ++argi)
606 if (strcmp(argv[argi],
"(") == 0)
611 else if (strcmp(argv[argi],
")") == 0)
619 args_[nArgs++] =
group;
625 args_[nArgs++] = argv[argi];
635 else if (argv[argi][0] ==
'-')
638 const char *optName = &argv[argi][1];
640 if (validOptions.found(optName))
643 args_[nArgs++] = argv[argi];
645 else if ((ignore = optionIgnore(optName)) > 0)
656 args_[nArgs++] = optionCompat(argv[argi]);
661 args_[nArgs++] = argv[argi];
668 args_[nArgs++] =
group;
674 for (
const auto&
s : args_)
680 commandLine_.reserve(len);
686 void Foam::argList::setCasePaths()
690 const auto optIter = options_.cfind(
"case");
697 if (caseDir.empty() || caseDir ==
".")
701 options_.erase(
"case");
705 caseDir.toAbsolute();
716 rootPath_ = caseDir.path();
717 globalCase_ = caseDir.name();
724 setEnv(
"FOAM_CASE", caseDir,
true);
725 setEnv(
"FOAM_CASENAME", globalCase_,
true);
728 setEnv(
"FOAM_EXECUTABLE", executable_,
false);
749 for (
int argi = argc-2; argi > 0; --argi)
751 if (argv[argi][0] ==
'-')
753 const char *optName = &argv[argi][1];
755 if (strcmp(optName,
"fileHandler") == 0)
757 handlerType = argv[argi+1];
762 if (handlerType.empty())
765 if (handlerType.empty())
777 )().needsThreading();
782 for (
int argi = 1; argi < argc; ++argi)
784 if (argv[argi][0] ==
'-')
786 const char *optName = &argv[argi][1];
788 if (validParOptions.found(optName))
790 parRunControl_.runPar(argc, argv, needsThread);
797 regroupArgv(argc, argv);
798 commandLine_ += args_[0];
805 for (
int argi = 1; argi < args_.size(); ++argi)
808 commandLine_ += args_[argi];
810 if (args_[argi][0] ==
'-')
812 const char *optName = &args_[argi][1];
817 <<
"Ignoring lone '-' on the command-line" <<
endl;
821 validOptions.lookup(optName,
"").size()
822 || validParOptions.lookup(optName,
"").size()
829 if (argi >= args_.size())
834 <<
"Error: option '-" << optName
835 <<
"' requires an argument" <<
nl <<
nl
836 <<
"See '" << executable_ <<
" -help' for usage"
843 commandLine_ += args_[argi];
845 if (strcmp(optName,
"lib") == 0)
849 libs_.append(this->getList<fileName>(argi));
851 else if (strcmp(optName,
"debug-switch") == 0)
859 else if (strcmp(optName,
"info-switch") == 0)
867 else if (strcmp(optName,
"opt-switch") == 0)
879 options_.set(optName, args_[argi]);
887 options_.insert(optName,
"");
894 args_[nArgs] = args_[argi];
902 parse(checkArgs, checkOpts, initialise);
915 parRunControl_(
args.parRunControl_),
919 executable_(
args.executable_),
920 rootPath_(
args.rootPath_),
921 globalCase_(
args.globalCase_),
923 commandLine_(
args.commandLine_)
925 parse(checkArgs, checkOpts, initialise);
943 bool quickExit =
false;
946 if (options_.found(
"doc"))
953 options_.found(
"doc-source")
954 || options_.found(
"srcDoc")
962 if (options_.found(
"help-full"))
967 else if (options_.found(
"help-notes"))
973 else if (options_.found(
"help"))
978 else if (options_.found(
"help-man"))
985 if (options_.found(
"help-compat"))
998 if (!check(checkArgs, checkOpts))
1032 <<
"Exec : " << commandLine_.c_str() <<
nl
1033 <<
"Date : " << dateString.c_str() <<
nl
1034 <<
"Time : " << timeString.c_str() <<
nl
1052 const auto space =
build.find(
' ');
1053 if (space != std::string::npos)
1055 build.resize(space);
1061 libs_.open(bannerEnabled());
1074 options_.lookup(
"fileHandler",
Foam::getEnv(
"FOAM_FILEHANDLER"));
1076 if (handlerType.empty())
1091 if (parRunControl_.parRun())
1109 fromSlave >> slaveBuild >> slaveMachine[proci] >> slavePid;
1111 slaveProcs[proci] = slaveMachine[proci] +
"." +
name(slavePid);
1119 <<
"; slave " << proci <<
" is running version "
1144 if (parRunControl_.parRun())
1154 fileName source = rootPath_/globalCase_/
"system"/
"decomposeParDict";
1155 if (options_.found(
"decomposeParDict"))
1157 bool adjustOpt =
false;
1159 source = options_[
"decomposeParDict"];
1162 source /=
"decomposeParDict";
1169 source = rootPath_/globalCase_/source;
1177 options_.set(
"decomposeParDict", source);
1182 label dictNProcs = -1;
1183 if (this->readListIfPresent(
"roots", roots))
1185 parRunControl_.distributed(
true);
1187 if (roots.size() != 1)
1189 dictNProcs = roots.size()+1;
1192 else if (options_.found(
"hostRoots"))
1196 source =
"-hostRoots";
1197 ITstream is(source, options_[
"hostRoots"]);
1200 checkITstream(is,
"hostRoots");
1202 for (
const auto& hostRoot : hostRoots)
1208 for (
const label slavei : matched)
1210 if (!roots[slavei].empty())
1213 <<
"Slave " << slaveMachine[slavei]
1214 <<
" has multiple matching roots in "
1218 roots[slavei] = hostRoot.second();
1225 if (roots[slavei].empty())
1228 <<
"Slave " << slaveMachine[slavei]
1229 <<
" has no matching roots in "
1234 if (roots.size() != 1)
1236 dictNProcs = roots.size()+1;
1239 else if (checkProcessorDirectories_)
1246 if (!decompDictStream.
good())
1249 <<
"Cannot read decomposeParDict from "
1250 << decompDictStream.
name()
1256 decompDict.
readEntry(
"numberOfSubdomains", dictNProcs);
1260 parRunControl_.distributed(
true);
1267 if (roots.size() == 1)
1275 dictNProcs = roots.size()+1;
1293 <<
" specifies " << dictNProcs
1294 <<
" processors but job was started with "
1306 <<
"number of entries in roots "
1308 <<
" is not equal to the number of slaves "
1319 const bool hadCaseOpt = options_.found(
"case");
1327 options_.set(
"case", roots[slave-1]/globalCase_);
1330 toSlave << args_ << options_ << roots.size();
1332 options_.erase(
"case");
1337 options_.set(
"case", rootPath_/globalCase_);
1346 checkProcessorDirectories_
1350 label nProcDirs = 0;
1355 rootPath_/globalCase_
1364 <<
"number of processor directories = "
1366 <<
" is not equal to the number of processors = "
1381 toSlave << args_ << options_ << roots.size();
1395 fromMaster >> args_ >> options_ >> nroots;
1397 parRunControl_.distributed(nroots);
1410 case_ = globalCase_;
1417 if (!writeHostsSwitch)
1430 Info<<
"Case : " << (rootPath_/globalCase_).c_str() <<
nl
1431 <<
"nProcs : " << nProcs <<
endl;
1433 if (parRunControl_.parRun())
1435 if (slaveProcs.size())
1437 if (writeHostsSwitch == 1)
1445 Info<<
"Slaves : " << slaveProcs <<
nl;
1450 Info<<
"Roots : " << roots <<
nl;
1452 Info<<
"Pstream initialized with:" <<
nl
1467 if (slaveProcs.size())
1486 Info<<
"fileModificationChecking : "
1487 <<
"Monitoring run-time modified files using "
1506 Info<<
" (fileModificationSkew "
1512 Info<<
" (fileModificationSkew "
1514 <<
", maxFileModificationPolls "
1521 <<
"Invalid setting for maxFileModificationPolls "
1528 Info<<
"allowSystemOperations : ";
1535 Info<<
"Disallowing";
1537 Info<<
" user-supplied system call operations" <<
nl
1562 for (
const word& optName : optionNames)
1564 if (options_.found(optName))
1575 std::initializer_list<word> optionNames
1579 for (
const word& optName : optionNames)
1581 if (options_.found(optName))
1596 || optName ==
"parallel"
1597 || optName ==
"roots"
1601 <<
"Option: '" << optName <<
"' is protected" <<
nl
1606 if (options_.found(optName) ? (options_[optName] != param) :
true)
1608 options_.set(optName, param);
1622 || optName ==
"parallel"
1623 || optName ==
"roots"
1624 || optName ==
"hostRoots"
1628 <<
"Option: '" << optName <<
"' is protected" <<
nl
1634 return options_.erase(optName);
1647 docExt.
replace(
".",
"_source.");
1652 for (
const fileName& dir : docDirs)
1655 if (dir.starts_with(
"http:") || dir.starts_with(
"https:"))
1657 url = dir/executable_ + docExt;
1666 ?
isFile(docFile.substr(7))
1670 url = std::move(docFile);
1678 <<
"No documentation found for " << executable_
1679 <<
", but you can use -help to display the usage\n" <<
endl;
1684 string docBrowser =
getEnv(
"FOAM_DOC_BROWSER");
1685 if (docBrowser.empty())
1687 docDict.
readEntry(
"docBrowser", docBrowser);
1691 if (docBrowser.find(
"%f") != std::string::npos)
1693 docBrowser.
replace(
"%f", url);
1697 docBrowser +=
" " + url;
1706 <<
" " << command <<
nl <<
endl;
1718 const label nargs = args_.size()-1;
1719 if (checkArgs && nargs != validArgs.size())
1722 <<
"Expected " << validArgs.size()
1723 <<
" arguments but found " << nargs <<
endl;
1731 const word& optName = iter.key();
1734 !validOptions.found(optName)
1735 && !validParOptions.found(optName)
1739 <<
"Invalid option: -" << optName <<
endl;
1749 <<
"See '" << executable_ <<
" -help' for usage"
1764 <<
": cannot open root directory " << rootPath()
1772 if (checkProcessorDirectories_ && pathDir.empty() &&
Pstream::master())
1778 <<
": cannot open case directory " <<
path()
static SLList< string > validArgs
A list of valid (mandatory) arguments.
string & replace(const std::string &s1, const std::string &s2, size_type pos=0)
label count(const UList< word > &optionNames) const
Return how many of the specified options were used.
static void set(bool verbose=false)
Activate SIGFPE signal handler when FOAM_SIGFPE is set.
static void noBanner()
Disable emitting the banner information.
static bool writeJobInfo
Global value for writeJobInfo enabled.
static std::string::size_type usageMin
Min indentation when displaying usage (default: 20)
const std::string build
OpenFOAM build information as a std::string.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
static constexpr int masterNo() noexcept
Process index of the master.
static void addUsage(const word &optName, const string &usage)
Add option usage information to optionUsage.
A class for handling words, derived from Foam::string.
Foam::argList::initValidTables dummyInitValidTables
static const Enum< fileCheckTypes > fileCheckTypesNames
Names for the fileCheckTypes.
static std::string::size_type usageMax
Max screen width when displaying usage (default: 80)
A class for handling file names.
static HashTable< std::pair< word, int > > validOptionsCompat
A list of aliases for options.
static fileName validate(const std::string &s, const bool doClean=true)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
static fileName envGlobalPath()
Global case (directory) from environment variable.
Input from file stream, using an ISstream.
static Ostream & writeBanner(Ostream &os, bool noHint=false)
Write the standard OpenFOAM file/dictionary banner.
Output inter-processor communications stream.
bool starts_with(const std::string &s) const
True if string starts with the given prefix (cf. C++20)
static void exit(int errnum=1)
Exit program.
virtual const fileName & name() const
Read/write access to the name of the stream.
static HashTable< string > optionUsage
Short description for validOptions.
static float fileModificationSkew
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
int system(const std::string &command, const bool bg=false)
Execute the specified command via the shell.
static fileCheckTypes fileModificationChecking
Type of file modification checking.
static int maxFileModificationPolls
static void addNote(const string ¬e)
Add extra notes for the usage information.
static void addOptionCompat(const word &optName, std::pair< const char *, int > compat)
Specify an alias for the option name.
Extract command arguments and options from the supplied argc and argv parameters.
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
const fileOperation & fileHandler()
Get current file handler.
const char *const group
Group name for atomic constants.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool setEnv(const word &name, const std::string &value, const bool overwrite)
Set an environment variable, return true on success.
static commsTypes defaultCommsType
Default commsType.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Foam::SubStrings< StringType > splitSpace(const StringType &str)
Split string into sub-strings at whitespace (TAB, NL, VT, FF, CR, SPC)
static void noMandatoryArgs()
Flag command arguments as being optional (non-mandatory)
string getEnv(const std::string &envName)
Get environment value for given envName.
#define forAll(list, i)
Loop across all elements in list.
argList(int &argc, char **&argv, bool checkArgs=argList::argsMandatory(), bool checkOpts=true, bool initialise=true)
pid_t pgid()
Return the group PID of this process.
static int allowSystemOperations
Flag if system operations are allowed.
static void ignoreOptionCompat(std::pair< const char *, int > compat, bool expectArg)
Specify an option to be ignored.
void setNamedInt(std::string name, int val, bool report=false)
Set named value, but also handle embedded name=value syntax.
static void addArgument(const string &argName, const string &usage="")
Append a (mandatory) argument to validArgs.
int infoSwitch(const char *name, const int deflt=0)
Lookup info switch or add default value.
static void printHostsSubscription(const UList< string > &slaveProcs)
static autoPtr< fileOperation > New(const word &handlerType, bool verbose=false)
Select fileHandler-type.
Template class for non-intrusive linked lists.
static HashTable< string > validParOptions
A list of valid parallel options.
void parse(bool checkArgs, bool checkOpts, bool initialise)
static void noLibs()
Add the '-no-libs' command line option.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurances.
string userName()
Return the user's login name.
simpleObjectRegistry & optimisationObjects()
Access to registered OptimisationSwitch objects.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An input stream of tokens.
bool setOption(const word &optName, const string ¶m="")
Set option directly (use with caution)
static int lastSlave(const label communicator=0)
Process index of last slave.
static void noJobInfo()
Suppress JobInfo, overriding controlDict setting.
messageStream Info
Information stream (uses stdout - output is on the master only)
simpleObjectRegistry & debugObjects()
Access to registered DebugSwitch objects.
word name(const complex &c)
Return string representation of complex.
static bool floatTransfer
pid_t pid()
Return the PID of this process.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
pid_t ppid()
Return the parent PID of this process.
static word postProcessOptionName
Standard name for the post-processing option.
bool readEntry(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX, bool mandatory=true) const
graph_traits< Graph >::vertices_size_type size_type
static void setAdvanced(const word &optName, bool advanced=true)
Set an existing option as being 'advanced' or normal.
static const Enum< commsTypes > commsTypeNames
Names of the communication types.
void resize(const label newSize)
Adjust allocated size of list.
static void noCheckProcessorDirectories()
Remove checking of processor directories.
static HashTable< string > validOptions
A list of valid options.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
simpleObjectRegistry & infoObjects()
Access to registered InfoSwitch objects.
static bool postProcess(int argc, char *argv[])
Return true if the post-processing option is specified.
static std::string date()
Return the current wall-clock date as a string.
static word defaultFileHandler
Default fileHandler.
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
int infoDetailLevel
Global for selective suppression of Info output.
static const fileName null
An empty fileName.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const std::string version
OpenFOAM version (name or stringified number) as a std::string.
bool unsetOption(const word &optName)
Unset option directly (use with caution)
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static bool master(const label communicator=0)
Am I the master process.
static int nProcsSimpleSum
static constexpr int firstSlave() noexcept
Process index of first slave.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static HashSet< string > advancedOptions
The "advanced" options are shown with -help-full (not with –help)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static void warnAboutAge(const char *what, const int version)
Emit warning on stderr about something being old.
forAllConstIters(mixture.phases(), phase)
static bool argsMandatory()
Command arguments type (optional/mandatory).
const std::string patch
OpenFOAM patch number as a std::string.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
static void set(bool verbose=false)
Activate SIGSEGV signal handler.
static Ostream & writeDivider(Ostream &os)
Write the standard file section divider.
string expand(const std::string &str, const HashTable< string, word, string::hash > &mapping, const char sigil='$')
const std::string buildArch
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
string hostName(const bool full=false)
Return the system's host name, as per hostname(1)
void clear()
Clear the list, i.e. set size to zero.
void printBuildInfo(const bool full=true)
Print information about version, build, arch to Info.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
static SLList< string > notes
General usage notes.
bool checkRootCase() const
Check root path and case path.
static std::string clockTime()
Return the current wall-clock time as a string.
static bool clean(std::string &str)
Cleanup filename.
fileName cwd()
The physical or logical current working directory path name.
Operations on lists of strings.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
Input inter-processor communications stream.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
static HashTable< std::pair< bool, int > > ignoreOptionsCompat
A list of options to ignore.
void write(Ostream &os, const bool includeTitle=true) const
Print error message.
dictionary & controlDict()
static HashTable< string, label, Hash< label > > argUsage
Short description for program arguments.
bool check(bool checkArgs=argList::argsMandatory(), bool checkOpts=true) const
static void noParallel()
Remove the parallel options.
bool good() const
Return true if next operation might succeed.
static void set(bool verbose=false)
Activate SIGQUIT signal handler.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
static bool bannerEnabled()
Banner status (enabled/disabled).
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
Foam::argList args(argc, argv)
static bool isAbsolute(const std::string &str)
Return true if string starts with a '/'.
virtual ~argList()
Destructor.
void displayDoc(bool source=false) const
Display documentation in browser.
static void set(bool verbose=false)
Activate SIGINT signal handler.
static void removeOption(const word &optName)
Remove option from validOptions and from optionUsage.
static int nPollProcInterfaces
Number of polling cycles in processor updates.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
static autoPtr< fileOperationInitialise > New(const word &type, int &argc, char **&argv)
Select type.
An adapter for copying a list of C++ strings into a list of C-style strings for passing to C code tha...