mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
- for some special cases we wish to mark command-line arguments as
being optional, in order to do our own treatment. For example,
when an arbitrary number of arguments should be allowed.
Now tag this situation with argList::noMandatoryArgs().
The argList::argsMandatory() query can then be used in any further
logic, including the standard default argument checking.
- with the new default check, can consolidate the special-purpose
"setRootCaseNonMandatoryArgs.H"
into the regular
"setRootCase.H"
- revert to a simple "setRootCase.H" and move all the listing related
bits to a "setRootCaseLists.H" file. This leaves the information
available for solvers, or whoever else wishes, without being
introduced everywhere.
- add include guards and scoping to the listing files and rename to
something less generic.
listOptions.H -> setRootCaseListOptions.H
listOutput.H -> setRootCaseListOutput.H
114 lines
2.8 KiB
C
114 lines
2.8 KiB
C
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
// Process some "standard" list options
|
|
|
|
#ifndef setRootCaseListOutput_H
|
|
#define setRootCaseListOutput_H
|
|
|
|
{
|
|
bool listOptions = false;
|
|
|
|
if (args.found("listSwitches"))
|
|
{
|
|
debug::listSwitches(args.found("includeUnsetSwitches"));
|
|
listOptions = true;
|
|
}
|
|
|
|
if (args.found("listRegisteredSwitches"))
|
|
{
|
|
debug::listRegisteredSwitches(args.found("includeUnsetSwitches"));
|
|
listOptions = true;
|
|
}
|
|
|
|
#ifdef fvPatchField_H
|
|
if (args.found("listScalarBCs"))
|
|
{
|
|
Info<< "scalarBCs"
|
|
<< fvPatchField<Foam::scalar>::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
listOptions = true;
|
|
}
|
|
|
|
if (args.found("listVectorBCs"))
|
|
{
|
|
Info<< "vectorBCs"
|
|
<< fvPatchField<Foam::vector>::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
listOptions = true;
|
|
}
|
|
#endif
|
|
|
|
#ifdef functionObject_H
|
|
if (args.found("listFunctionObjects"))
|
|
{
|
|
Info<< "functionObjects"
|
|
<< functionObject::dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
listOptions = true;
|
|
}
|
|
#endif
|
|
|
|
#ifdef fvOption_H
|
|
if (args.found("listFvOptions"))
|
|
{
|
|
Info<< "fvOptions"
|
|
<< fv::option::dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
listOptions = true;
|
|
}
|
|
#endif
|
|
|
|
#ifdef turbulentTransportModel_H
|
|
if (args.found("listTurbulenceModels"))
|
|
{
|
|
Info<< "Turbulence models"
|
|
<< incompressible::turbulenceModel::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
|
|
Info<< "RAS models"
|
|
<< incompressible::RASModel::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
|
|
Info<< "LES models"
|
|
<< incompressible::LESModel::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
listOptions = true;
|
|
}
|
|
#elif defined(turbulentFluidThermoModel_H)
|
|
if (args.found("listTurbulenceModels"))
|
|
{
|
|
Info<< "Turbulence models"
|
|
<< compressible::turbulenceModel::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
|
|
Info<< "RAS models"
|
|
<< compressible::RASModel::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
|
|
Info<< "LES models"
|
|
<< compressible::LESModel::
|
|
dictionaryConstructorTablePtr_->sortedToc()
|
|
<< endl;
|
|
listOptions = true;
|
|
}
|
|
#endif
|
|
|
|
if (listOptions)
|
|
{
|
|
exit(0);
|
|
}
|
|
}
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
#endif
|
|
|
|
// ************************************************************************* //
|