foamPostProcess: Added -listTemplates option to list the available functionObject templates

located in the etc/caseDicts/functionTemplates directory
This commit is contained in:
Henry Weller
2024-02-21 16:37:15 +00:00
parent 11be8e6a3f
commit 1896616caf

View File

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