foamPostProcess: Added -listTemplates option to list the available functionObject templates
located in the etc/caseDicts/functionTemplates directory
This commit is contained in:
@ -68,6 +68,9 @@ Usage
|
|||||||
- \par -list
|
- \par -list
|
||||||
List the available configured functionObjects
|
List the available configured functionObjects
|
||||||
|
|
||||||
|
- \par -list
|
||||||
|
List the available functionObject templates
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
- Print the list of available configured functionObjects:
|
- Print the list of available configured functionObjects:
|
||||||
\verbatim
|
\verbatim
|
||||||
@ -208,11 +211,19 @@ int main(int argc, char *argv[])
|
|||||||
#include "addRegionOption.H"
|
#include "addRegionOption.H"
|
||||||
#include "addFunctionObjectOptions.H"
|
#include "addFunctionObjectOptions.H"
|
||||||
|
|
||||||
|
argList::addBoolOption
|
||||||
|
(
|
||||||
|
"listTemplates",
|
||||||
|
"List the available functionObjects templates"
|
||||||
|
);
|
||||||
|
|
||||||
// Set functionObject post-processing mode
|
// Set functionObject post-processing mode
|
||||||
functionObject::postProcess = true;
|
functionObject::postProcess = true;
|
||||||
|
|
||||||
#include "setRootCase.H"
|
#include "setRootCase.H"
|
||||||
|
|
||||||
|
bool printedList = false;
|
||||||
|
|
||||||
if (args.optionFound("list"))
|
if (args.optionFound("list"))
|
||||||
{
|
{
|
||||||
Info<< nl
|
Info<< nl
|
||||||
@ -222,6 +233,26 @@ int main(int argc, char *argv[])
|
|||||||
functionEntries::includeFuncEntry::functionObjectDictPath
|
functionEntries::includeFuncEntry::functionObjectDictPath
|
||||||
)
|
)
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
|
printedList = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (args.optionFound("listTemplates"))
|
||||||
|
{
|
||||||
|
Info<< nl
|
||||||
|
<< "Available functionObject templates:"
|
||||||
|
<< listAllConfigFiles
|
||||||
|
(
|
||||||
|
functionEntries::includeFuncEntry::functionObjectDictPath
|
||||||
|
/"../functionTemplates"
|
||||||
|
)
|
||||||
|
<< endl;
|
||||||
|
|
||||||
|
printedList = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (printedList)
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user