profilingPool-singleton also destroys it (for programs with more than one
Time-instance)
Also protect the initiation and destruction of the singleton so that only a
Time-instance can do this
This is a major modification to the definition and handling of global control switches, namely the DebugSwitches, InfoSwitches, OptimisationSwitches, Tolerances and DimensionedConstants defined in the
Those values are now defined as objects, and are no longer defined using simple types like scalar or int.
It is now possible to override any of those control switches from the command-line, like this:
simpleFoam -help
Usage: simpleFoam [-DebugSwitches key1=val1,key2=val2,...] [-DimensionedConstants key1=val1,key2=val2,...] [-InfoSwitches key1=val1,key2=val2,...] [-OptimisationSwitches key1=val1,key2=val2,...] [-Tol
or
simpleFoam -DebugSwitches fvVectorMatrix=1,fvScalarMatrix=1
The 'banana' test is also implemented in order to dump the list of all the known control switches for a given application. One can use any bogus key name in order to get the list:
simpleFoam -DebugSwitches banana=1
The global controlDict file '$WM_PROJECT_DIR/etc/controlDict' is gone. One can still use a file to override a whole bunch of control switches by using the environment variable FOAM_GLOBAL_CONTROLDICT
One can also override case specific controlSwitches by using the case system/controlDict file.
Here is the order of precedence for the definition/overriding of the control switches, from lowest to highest:
- source code definitions from the various libraries/solvers
- file specified by the env. variable FOAM_GLOBAL_CONTROLDICT
- case's system/controlDict file
- command-line parameters
The application 'foamDebugSwitches' is gone. Instead, one can use the command-line option '-dumpControlSwitches' to print at the console the full list of control switches for a given application. The
At the source code level, when creating a control switch object, one can now add an optional description string in order to document its behaviour or purpose. That string description will be written a
Martin Beaudoin
Reorganisation of global controlDict by Hrvoje Jasak.
This file is no longer necessary.
- If necessary, one can still use a global controlDict file
using the environment variable FOAM_GLOBAL_CONTROLDICT
- Case specific global control switches values can now be
supplied in the case's system/controlDict file.
- Renaming $WM_PROJECT_DIR/etc/controlDict to
$WM_PROJECT_DIR/etc/controlDict-EXAMPLE
- Some code cleanup.