A module which allows multiple values of certain parameters to be considered within a single simulation.
In its simplest form, it starts with a given value of the parameter in question, runs for a given number of timesteps, and then changes the parameter by a given increment, until a lower limit is reached. In a more advanced scenario, the parameter scan continues until a different condition is satisfied: for example, zero heat flux. In a third scenario, the parameter is varied using a root finding algorithm. In addition, the condition for changing the parameter may be changed from a simple number of time steps to, for example, reaching a saturated state.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | scan_restarted | ||||
integer, | private | :: | scan_parameter_switch | ||||
integer, | private, | parameter | :: | scan_parameter_tprim | = | 1 | |
integer, | private, | parameter | :: | scan_parameter_g_exb | = | 2 | |
integer, | public | :: | target_parameter_switch | ||||
integer, | public | :: | scan_type_switch | ||||
integer, | private | :: | increment_condition_switch | ||||
integer, | public, | parameter | :: | scan_type_none | = | 1 | |
integer, | private, | parameter | :: | scan_type_range | = | 2 | |
integer, | private, | parameter | :: | scan_type_target | = | 3 | |
integer, | private, | parameter | :: | scan_type_root_finding | = | 4 | |
integer, | public, | parameter | :: | target_parameter_hflux_tot | = | 1 | |
integer, | public, | parameter | :: | target_parameter_momflux_tot | = | 2 | |
integer, | public, | parameter | :: | target_parameter_phi2_tot | = | 3 | |
integer, | private, | parameter | :: | increment_condition_n_timesteps | = | 1 | |
integer, | private, | parameter | :: | increment_condition_delta_t | = | 2 | |
integer, | private, | parameter | :: | increment_condition_saturated | = | 3 | |
real, | private | :: | par_start | ||||
real, | private | :: | par_end | ||||
real, | private | :: | par_inc | ||||
integer, | private | :: | nstep_init | ||||
integer, | private | :: | nstep_inc | ||||
integer, | private | :: | scan_spec | ||||
real, | private | :: | delta_t_init | ||||
real, | private | :: | delta_t_inc | ||||
real, | private | :: | target_val | ||||
integer, | private | :: | scan_output_file | ||||
real, | private | :: | current_target_value | = | 0.0 | ||
logical, | public | :: | scanning | = | .false. | ||
logical, | private | :: | initialized | = | .false. | ||
type(parameter_scan_config_type), | private | :: | parameter_scan_config |
Used to represent the input configuration of parameter_scan
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | exist | = | .false. |
Does the related namelist exist in the target input file? |
|
integer, | public | :: | index | = | 0 |
Used to hold the specific index of numbered namelists |
|
logical, | public | :: | skip_read | = | .false. |
Do we want to skip the read step in init? |
|
logical, | public | :: | skip_broadcast | = | .false. |
Do we want to skip the broadcast step in init? |
|
real, | public | :: | delta_t_inc | = | 0.0 |
When the increment condition is |
|
real, | public | :: | delta_t_init | = | 0.0 |
When the increment condition is |
|
character(len=20), | public | :: | inc_con | = | 'delta_t' |
Specifies the condition for incrementing the parameter. Possible values are: |
|
integer, | public | :: | nstep_inc | = | 0 |
When the increment condition is |
|
integer, | public | :: | nstep_init | = | 0 |
When the increment condition is 'n_timesteps' or 'saturated', the parameter will not be changed until nstep_init have elapsed from the beginning of the simulation. Note that if the simulation is restarted, this parameter will measure from the restart. |
|
real, | public | :: | par_end | = | 0.0 |
If the scan is being run in 'range' mode, specifies the value of the parameter that will be reached. |
|
real, | public | :: | par_inc | = | 0.0 |
If the parameter scan is being run in 'range' or 'target' modes, specifies the amount by which the parameter is varied at one go. |
|
real, | public | :: | par_start | = | 0.0 |
Specifies the starting value for the parameter scan. |
|
character(len=20), | public | :: | scan_par | = | 'tprim' |
Specify the parameter to be varied. If the parameter pertains to a species, the scan_spec must be specified as well. |
|
logical, | public | :: | scan_restarted | = | .false. |
Specify the parameter to be varied. If the parameter pertains to a species, the scan_spec must be specified as well. |
|
integer, | public | :: | scan_spec | = | 1 |
When parameter pertains to a species, specifies the index of the species. |
|
character(len=20), | public | :: | scan_type | = | 'none' |
Specifies the way that the parameter scan is conducted. Possible values are: |
|
character(len=20), | public | :: | target_par | = | 'hflux_tot' |
If the scan is being run in 'target' or 'root_finding' mode, specifies the target parameter. Possible values are: |
|
real, | public | :: | target_val | = | 0.0 |
Gets the default name for this namelist
Gets the default requires index for this namelist
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(parameter_scan_config_type), | intent(in), | optional | :: | parameter_scan_config_in |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | nwrite | |||
logical, | intent(in) | :: | write_fluxes |
FIXME : Add documentation
FIXME : Add documentation
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | istep | |||
logical, | intent(inout) | :: | reset | |||
logical, | intent(inout) | :: | exit |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(out) | :: | target_reached |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real, | intent(in) | :: | increment | |||
logical, | intent(inout) | :: | reset |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
logical, | intent(inout) | :: | reset |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | istep | |||
logical, | intent(out) | :: | increment_condition_satisfied |
FIXME : Add documentation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(parameter_scan_config_type), | intent(in), | optional | :: | parameter_scan_config_in |
Set the module level config type Will abort if the module has already been initialised to avoid inconsistencies.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(parameter_scan_config_type), | intent(in), | optional | :: | parameter_scan_config_in |
Reads in the parameter_scan_knobs namelist and populates the member variables
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parameter_scan_config_type), | intent(inout) | :: | self |
Writes out a namelist representing the current state of the config object
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parameter_scan_config_type), | intent(in) | :: | self | |||
integer, | intent(in), | optional | :: | unit |
Resets the config object to the initial empty state
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parameter_scan_config_type), | intent(inout) | :: | self |
Broadcasts all config parameters so object is populated identically on all processors
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(parameter_scan_config_type), | intent(inout) | :: | self |