mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
foamList: Added support for listing fvOptions, functionObjects and turbulence models
Usage: foamList [OPTIONS]
options:
-case <dir> specify alternate case directory, default is the cwd
-compressibleTurbulenceModels
List compressible turbulenceModels
-functionObjects List functionObjects
-fvOptions List fvOptions
-incompressibleTurbulenceModels
List incompressible turbulenceModels
-noFunctionObjects
do not execute functionObjects
-registeredSwitches
List switches registered for run-time modification
-switches List switches declared in libraries but not set in
etc/controlDict
-unset List switches declared in libraries but not set in
etc/controlDict
-srcDoc display source code in browser
-doc display application documentation in browser
-help print the usage
This commit is contained in:
@ -1,3 +1,13 @@
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-lsnappyHexMesh \
|
||||
-lbarotropicCompressibilityModel \
|
||||
|
||||
@ -46,6 +46,10 @@ Description
|
||||
#include "IOobject.H"
|
||||
#include "HashSet.H"
|
||||
#include "etcFiles.H"
|
||||
#include "functionObject.H"
|
||||
#include "fvOption.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
||||
@ -87,22 +91,22 @@ void listSwitches
|
||||
wordHashSet hashset;
|
||||
hashset = debugSwitches;
|
||||
hashset -= controlDictDebug;
|
||||
Info<< "Unset DebugSwitches: " << hashset.sortedToc() << endl;
|
||||
Info<< "Unset DebugSwitches" << hashset.sortedToc() << endl;
|
||||
|
||||
hashset = infoSwitches;
|
||||
hashset -= controlDictInfo;
|
||||
Info<< "Unset InfoSwitches: " << hashset.sortedToc() << endl;
|
||||
Info<< "Unset InfoSwitches" << hashset.sortedToc() << endl;
|
||||
|
||||
hashset = optSwitches;
|
||||
hashset -= controlDictOpt;
|
||||
Info<< "Unset OptimisationSwitches: " << hashset.sortedToc() << endl;
|
||||
Info<< "Unset OptimisationSwitches" << hashset.sortedToc() << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
IOobject::writeDivider(Info);
|
||||
Info<< "DebugSwitches: " << debugSwitches << endl;
|
||||
Info<< "InfoSwitches: " << infoSwitches << endl;
|
||||
Info<< "OptimisationSwitches: " << optSwitches << endl;
|
||||
Info<< "DebugSwitches" << debugSwitches << endl;
|
||||
Info<< "InfoSwitches" << infoSwitches << endl;
|
||||
Info<< "OptimisationSwitches" << optSwitches << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -140,17 +144,37 @@ int main(int argc, char *argv[])
|
||||
argList::addBoolOption
|
||||
(
|
||||
"switches",
|
||||
"Switches declared in libraries but not set in etc/controlDict"
|
||||
"List switches declared in libraries but not set in etc/controlDict"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"registeredSwitches",
|
||||
"Switches registered for run-time modification"
|
||||
"List switches registered for run-time modification"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"unset",
|
||||
"Switches declared in libraries but not set in etc/controlDict"
|
||||
"List switches declared in libraries but not set in etc/controlDict"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"functionObjects",
|
||||
"List functionObjects"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"fvOptions",
|
||||
"List fvOptions"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"incompressibleTurbulenceModels",
|
||||
"List incompressible turbulenceModels"
|
||||
);
|
||||
argList::addBoolOption
|
||||
(
|
||||
"compressibleTurbulenceModels",
|
||||
"List compressible turbulenceModels"
|
||||
);
|
||||
|
||||
argList args(argc, argv);
|
||||
@ -158,8 +182,10 @@ int main(int argc, char *argv[])
|
||||
if (!args.options().size())
|
||||
{
|
||||
args.printUsage();
|
||||
return 0;
|
||||
}
|
||||
else if
|
||||
|
||||
if
|
||||
(
|
||||
args.optionFound("switches")
|
||||
|| args.optionFound("registeredSwitches")
|
||||
@ -168,7 +194,55 @@ int main(int argc, char *argv[])
|
||||
listSwitches(args);
|
||||
}
|
||||
|
||||
Info<< "done" << endl;
|
||||
if (args.optionFound("functionObjects"))
|
||||
{
|
||||
Info<< "functionObjects"
|
||||
<< functionObject::dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (args.optionFound("fvOptions"))
|
||||
{
|
||||
Info<< "fvOptions"
|
||||
<< fv::option::dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (args.optionFound("incompressibleTurbulenceModels"))
|
||||
{
|
||||
Info<< "Turbulence models"
|
||||
<< incompressible::turbulenceModel::
|
||||
dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
|
||||
Info<< "RAS models"
|
||||
<< incompressible::RASModel::
|
||||
dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
|
||||
Info<< "LES models"
|
||||
<< incompressible::LESModel::
|
||||
dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
if (args.optionFound("compressibleTurbulenceModels"))
|
||||
{
|
||||
Info<< "Turbulence models"
|
||||
<< compressible::turbulenceModel::
|
||||
dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
|
||||
Info<< "RAS models"
|
||||
<< compressible::RASModel::
|
||||
dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
|
||||
Info<< "LES models"
|
||||
<< compressible::LESModel::
|
||||
dictionaryConstructorTablePtr_->sortedToc()
|
||||
<< endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user