Version 2 (modified by 12 years ago) ( diff ) | ,
---|
The FuncParam
Type
FuncParam
is intended as a generic structure to use when certain values may need to be passed into a function and it is impractical to use declared parameters or objects. A good example of this is with the ApplyOn_ family of functions, where the function pointer fparam
may need some parameter values passed in as well but we may not know which ones in particular to pass in. To this end, the FuncParam
type is essentially a collection of variables that frequently get used as function parameters.
A common practice throughout the BearCLAW code is to include a FuncParam
structure as a function input parameter in functions that have no need of any extra parameters. This FuncParam
, usually named Dummy
can then be passed along to any function calls within the function. This allows us to pass parameters through several layers of functions if necessary.
The source for this type definition can be viewed here.
INCLUDE Files
- FuncParamTypeCommon.f90: Supplies all the actual attribute definitions for this data type.
Attributes
* indicates a pointer.
- INTEGER AMRStep: Stores the current step of a grid. The default value is 0.
- INTEGER AMRSteps: Stores the total number of steps a grid is to be advanced. The default value is 0, and (presumably) AMRStep should never exceed this number.
- REAL tstart: The start time of this grid at the first step. This variable has 14 digits of precision, and a default value of 0.
- REAL tend: The end time for this grid in the simulation (meaning that it should not advance after reaching this time). This variable has 14 digits of precision, and a default value of 0.
- REAL dt: The length of the current timestep. This variable has 14 digits of precision, and a default value of 0.
- REAL dtnew: The recommended length of time to be tried for the next timestep.