The user will typically only have to use one routine from the Runtime
Parameters API,
RuntimeParameters_get. This
routine retrieves the value of a parameter stored in the linked list
in the RuntimeParameters_data module. In FLASH4 the
value of runtime parameters for a given unit are stored in that unit's
Unit_data Fortran module and they are typically initialized in the unit's
Unit_init routine. Each unit's 'init' routine is only
called once at the beginning of the simulation by Driver_initFlash. For more documentation
on the FLASH code architecture please see Chp:Architecture.
It is important to note that even though runtime parameters are declared in a
specific unit's Config file, the runtime parameters linked list is a global
space and so any unit can fetch a parameter, even if that unit did not declare it.
For example, the Driver unit declares the logical parameter restart,
however, many units, including the IO unit get restart parameter with
the RuntimeParameters_get interface. If a
section of the code asks for a runtime parameter that was not declared
in a Config file and thus is not in the runtime parameters
linked list, the FLASH code will call Driver_abortFlash
and stamp an error to the logfile. The other RuntimeParameter
routines in the API are not generally called by user routines.
They exist because various other units within FLASH need to
access parts of the RuntimeParameters interface. For example, the input/output unit IO needs
RuntimeParameters_set. There are no user-defined parameters which affect the RuntimeParameters unit.