![]() |
Stellarator-Tools
|
Base class representing a model. More...
Public Member Functions | |
procedure | set_param (this, id, i_index, j_index, value, eq_comm) |
Sets the value of a reconstruction model parameter. | |
procedure | set_grid_params (this, size) |
Sets grid parameters. | |
procedure | set_grid_profiles (this) |
Sets grid profile values. | |
procedure | get_param_id (this, param_name) |
Get the id for a parameter. | |
procedure | get_param_value (this, id, i_index, j_index) |
Gets the value of a model parameter. | |
procedure | get_param_name (this, id) |
Gets the name of a model parameter. | |
procedure | get_ne_type (this) |
Gets the electron density type as a string. | |
procedure | get_gp_ne_num_hyper_param (this) |
Get the number of electron density gp kernel hyper parameters. | |
procedure | get_ne_af (this) |
Gets the electron density profile af array. | |
procedure | get_ne_cart (this, x_cart) |
Gets the electron density at a cartesian position. | |
procedure | get_ne_radial (this, s) |
Gets the electron density at a radial position. | |
GENERIC | get_ne get_ne_cart, get_ne_radial |
procedure | get_gp_ne_ij (this, i, j) |
Get the electron density gp kernel value for the two indicies. | |
procedure | get_gp_ne_pi (this, x_cart, i) |
Get the electron density gp kernel value for the position and index. | |
procedure | get_gp_ne_pp (this, x_cart, y_cart) |
Get the electron density gp kernel value for the position and position. | |
GENERIC | get_gp_ne get_gp_ne_ij, get_gp_ne_pi, get_gp_ne_pp |
procedure | get_te_type (this) |
Gets the electron temperature type as a string. | |
procedure | get_gp_te_num_hyper_param (this) |
Get the number of electron temperature gp kernel hyper parameters. | |
procedure | get_te_af (this) |
Gets the electron temperature profile af array. | |
procedure | get_te_cart (this, x_cart) |
Gets the electron temperature at a cartesian position. | |
procedure | get_te_radial (this, s) |
Gets the electron temperature at a radial position. | |
GENERIC | get_te get_te_cart, get_te_radial |
procedure | get_gp_te_ij (this, i, j) |
Get the electron temperature gp kernel value for the two indicies. | |
procedure | get_gp_te_pi (this, x_cart, i) |
Get the electron temperature gp kernel value for the position and index. | |
procedure | get_gp_te_pp (this, x_cart, y_cart) |
Get the electron temperature gp kernel value for the position and position. | |
GENERIC | get_gp_te get_gp_te_ij, get_gp_te_pi, get_gp_te_pp |
procedure | get_ti_type (this) |
Gets the ion temperature type as a string. | |
procedure | get_gp_ti_num_hyper_param (this) |
Get the number of ion temperature gp kernel hyper parameters. | |
procedure | get_ti_af (this) |
Gets the ion temperature profile af array. | |
procedure | get_ti_cart (this, x_cart) |
Gets the electron temperature at a cartesian position. | |
procedure | get_ti_radial (this, s) |
Gets the ion temperature at a radial position. | |
GENERIC | get_ti get_ti_cart, get_ti_radial |
procedure | get_gp_ti_ij (this, i, j) |
Get the ion temperature gp kernel value for the two indicies. | |
procedure | get_gp_ti_pi (this, x_cart, i) |
Get the ion temperature gp kernel value for the position and index. | |
procedure | get_gp_ti_pp (this, x_cart, y_cart) |
Get the electron temperature gp kernel value for the position and position. | |
GENERIC | get_gp_ti get_gp_ti_ij, get_gp_ti_pi, get_gp_ti_pp |
procedure | get_sxrem_type (this, index) |
Gets the soft x-ray emissivity type as a string. | |
procedure | get_gp_sxrem_num_hyper_param (this, index) |
Get the number of soft x-ray emission gp kernel hyper parameters. | |
procedure | get_sxrem_af (this, index) |
Gets the soft x-ray emissivity profile af array. | |
procedure | get_sxrem_cart (this, x_cart, index) |
Gets the soft x-ray emissivity at a cartesian position. | |
procedure | get_sxrem_radial (this, s, index) |
Gets the soft x-ray emissivity at a radial position. | |
GENERIC | get_sxrem get_sxrem_cart, get_sxrem_radial |
procedure | get_gp_sxrem_ij (this, i, j, index) |
Get the soft x-ray emissivity gp kernel value for the two indicies. | |
procedure | get_gp_sxrem_pi (this, x_cart, i, index) |
Get the soft x-ray emissivity gp kernel value for the position and index. | |
procedure | get_gp_sxrem_pp (this, x_cart, y_cart, index) |
Get the soft x-ray emissivity gp kernel value for the position and position. | |
GENERIC | get_gp_sxrem get_gp_sxrem_ij, get_gp_sxrem_pi, get_gp_sxrem_pp |
procedure | get_sxrem_ratio (this, te) |
Gets the soft x-ray emissivity ratio. | |
procedure | get_signal_factor (this, index) |
Get the scale factor for a signal. | |
procedure | get_signal_offset (this, index) |
Get the offset factor for a signal. | |
procedure | is_recon_param (this, id) |
Determines if a parameter id is a reconstruction parameter. | |
procedure | has_vacuum_field (this) |
Determines if vacuum field information is available. | |
procedure | is_in_plasma (this, x_cart) |
Determines if a point is inside the plasma or outside. | |
procedure | limit_path_to_boundary (this, path) |
Limit an integration path to the boundary. | |
procedure | reset_state (this) |
Reset the internal state of the model. | |
procedure | save_state (this) |
Save the internal state of the model. | |
procedure | converge (this, num_iter, iou, eq_comm, param_name) |
Solves the model. | |
procedure | write (this, iou) |
Write out the model to an output file. | |
procedure | def_result (this, result_ncid, maxnsteps_dim_id, string_len_dim_id) |
Define NetCDF variables for the result file. | |
procedure | write_init_data (this, result_ncid) |
Write inital data to NetCDF result file. | |
procedure | write_step_data (this, result_ncid, current_step) |
Write step data to NetCDF result file. | |
procedure | restart (this, result_ncid, current_step) |
Restart the model. | |
procedure | sync_state (this, recon_comm) |
Syncronize the model state to children. | |
procedure | sync_child (this, index, recon_comm) |
Syncronize a child model state to the parent. | |
FINAL | model_destruct (this) |
Deconstruct a model_class object. | |
class(model_class) function, pointer | model_construct (ne_type, sxrem_type, te_type, ti_type, ne_unit, ne_min, te_min, ti_min, sxrem_min, pressure_fraction, emission, equilibrium, sxrem_te, sxrem_ratio, resonace_range, coosig_wgts, state_flags, signal_factor, signal_offset, int_params) |
Construct a model_class containing an equilibrium object. | |
Public Attributes | |
integer | state_flags = model_state_all_off |
State flags indicating with parts of the model have changes. | |
integer | ne_type = model_none_type |
Type decritption of the electron denisty. Possible values are model_none_type, model_ne_type and model_ne_te_p_type. | |
integer, dimension(:), pointer | sxrem_type => null() |
Type decritption of the soft x-ray emissivity. Possible values are model_none_type and model_sxrem_type. | |
integer | te_type = model_none_type |
Type decritption of the electron temperature. Possible values are model_none_type, model_te_type and model_te_ne_p_type. | |
integer | ti_type = model_none_type |
Type decritption of the ion temperature. Possible values are model_none_type and model_ti_type. | |
real(rprec) | ne_unit = 1.0 |
Unit scaling of the electron density. | |
real(rprec) | ne_min = 0.0 |
Minimum electron density. | |
real(rprec) | te_min = 0.0 |
Minimum electron temperature. | |
real(rprec) | ti_min = 0.0 |
Minimum ion temperature. | |
real(rprec), dimension(:), pointer | sxrem_min => null() |
Minimum soft x-ray emission. | |
real(rprec) | pressure_fraction = 0.0 |
Electron pressure fraction. | |
real(rprec), dimension(:), pointer | coosig_wgts => null() |
Array of weights for combination signals. | |
type(emission_class), pointer | emission => null() |
Soft X-Ray emission function. | |
real(rprec), dimension(:,:), pointer | transmission => null() |
Filter transmission functions. | |
class(equilibrium_class), pointer | equilibrium => null() |
The equilibrium. | |
real(rprec) | grid_start |
Grid start. | |
real(rprec) | grid_step |
Grid stop. | |
real(rprec), dimension(:), pointer | ne_grid => null() |
Girded electron density profile. | |
real(rprec), dimension(:,:), pointer | sxrem_grid => null() |
Grided electron soft x-ray profile. | |
real(rprec), dimension(:), pointer | te_grid => null() |
Grided electron temperature profile. | |
real(rprec), dimension(:), pointer | ti_grid => null() |
Grided ion temperature profile. | |
real(rprec), dimension(:), pointer | sxrem_te => null() |
Soft X-ray emissivity tempurature. | |
real(rprec), dimension(:), pointer | sxrem_ratio => null() |
Soft X-ray emissivity ratio. | |
real(rprec) | resonace_range |
ECE resonance range. | |
real(rprec), dimension(:), pointer | signal_factor => null() |
Model Signal factor. | |
real(rprec), dimension(:), pointer | signal_offset => null() |
Model Signal offset. | |
class(integration_path_class), pointer | int_params => null() |
Integration parameters. | |
Base class representing a model.
Interface for the construction of mse_class types using mse_construct_vec or mse_construct_rad.
procedure model::model_class::converge | ( | class (model_class), intent(inout) | this, |
integer, intent(inout) | num_iter, | ||
integer, intent(in) | iou, | ||
integer, intent(in) | eq_comm, | ||
character (len=*), intent(in) | param_name | ||
) |
Solves the model.
This solves the equilibirum model and computes modeled values. The modeled values computed are the grided model values.
[in,out] | this | A model_class instance. |
[in,out] | num_iter | Counter to track the number of iterations. |
[in] | iou | Input/output unit of the file to write logs to. |
[in] | eq_comm | MPI communicator pool for the equilibrium. |
[in] | param_name | Name of the peturbed parameter. |
procedure model::model_class::def_result | ( | class (model_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | maxnsteps_dim_id, | ||
integer, intent(in) | string_len_dim_id | ||
) |
Define NetCDF variables for the result file.
Defines dimensions and variables for the model contribution of the result file. Multi dimensional arrays need to be transposed so arrays appear in the correct order in non fortran languages.
[in] | this | A model_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | maxnsetps_dim_id | NetCDF dimension id of the number of steps dimension. |
procedure model::model_class::get_gp_ne_ij | ( | class (model_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j | ||
) |
Get the electron density gp kernel value for the two indicies.
Gets the electron density gp kernel for two points. This also sets the scaling and min values.
[in] | this | A model_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
procedure model::model_class::get_gp_ne_num_hyper_param | ( | class (model_class), intent(in) | this | ) |
Get the number of electron density gp kernel hyper parameters.
Returns the number of availible hyper parameters in the electron density guassian process kernel.
[in] | this | A model_class instance. |
procedure model::model_class::get_gp_ne_pi | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
integer, intent(in) | i | ||
) |
Get the electron density gp kernel value for the position and index.
Gets the electron density gp kernel for point and index. This also sets the scaling and min values.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
[in] | i | ith profile position. |
procedure model::model_class::get_gp_ne_pp | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
real (rprec), dimension(3), intent(in) | y_cart | ||
) |
Get the electron density gp kernel value for the position and position.
Gets the electron density gp kernel for point and index. This also sets the scaling and min values.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
procedure model::model_class::get_gp_sxrem_ij | ( | class (model_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(in) | index | ||
) |
Get the soft x-ray emissivity gp kernel value for the two indicies.
Gets the soft x-ray emissivity gp kernel for two points. This also sets the min value.
[in] | this | A model_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
[in] | index | Index of the soft x-ray emissivity profile. |
procedure model::model_class::get_gp_sxrem_num_hyper_param | ( | class (model_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Get the number of soft x-ray emission gp kernel hyper parameters.
Returns the number of availible hyper parameters in the soft x-ray emission guassian process kernel.
[in] | this | A model_class instance. |
[in] | index | Index of the soft x-ray emissivity profile. |
procedure model::model_class::get_gp_sxrem_pi | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
integer, intent(in) | i, | ||
integer, intent(in) | index | ||
) |
Get the soft x-ray emissivity gp kernel value for the position and index.
Gets the soft x-ray emissivity gp kernel for point and index. This also sets the scaling and min values.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
[in] | i | ith profile position. |
[in] | index | Index of the soft x-ray emissivity profile. |
procedure model::model_class::get_gp_sxrem_pp | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
real (rprec), dimension(3), intent(in) | y_cart, | ||
integer, intent(in) | index | ||
) |
Get the soft x-ray emissivity gp kernel value for the position and position.
Gets the soft x-ray emissivity gp kernel for point and index. This also sets the min value.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
procedure model::model_class::get_gp_te_ij | ( | class (model_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j | ||
) |
Get the electron temperature gp kernel value for the two indicies.
Gets the electron temperature gp kernel for two points. This also sets the min value.
[in] | this | A model_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
procedure model::model_class::get_gp_te_num_hyper_param | ( | class (model_class), intent(in) | this | ) |
Get the number of electron temperature gp kernel hyper parameters.
Returns the number of availible hyper parameters in the electron temperature guassian process kernel.
[in] | this | A model_class instance. |
procedure model::model_class::get_gp_te_pi | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
integer, intent(in) | i | ||
) |
Get the electron temperature gp kernel value for the position and index.
Gets the electron temperature gp kernel for point and index. This also sets the scaling and min values.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
[in] | i | ith profile position. |
procedure model::model_class::get_gp_te_pp | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
real (rprec), dimension(3), intent(in) | y_cart | ||
) |
Get the electron temperature gp kernel value for the position and position.
Gets the electron temperature gp kernel for point and index.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
procedure model::model_class::get_gp_ti_ij | ( | class (model_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j | ||
) |
Get the ion temperature gp kernel value for the two indicies.
Gets the ion temperature gp kernel for two points. This also sets the min value.
[in] | this | A model_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
procedure model::model_class::get_gp_ti_num_hyper_param | ( | class (model_class), intent(in) | this | ) |
Get the number of ion temperature gp kernel hyper parameters.
Returns the number of availible hyper parameters in the ion temperature guassian process kernel.
[in] | this | A model_class instance. |
procedure model::model_class::get_gp_ti_pi | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
integer, intent(in) | i | ||
) |
Get the ion temperature gp kernel value for the position and index.
Gets the ion temperature gp kernel for point and index. This also sets the scaling and min values.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the ion temperature at. |
[in] | i | ith profile position. |
procedure model::model_class::get_gp_ti_pp | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
real (rprec), dimension(3), intent(in) | y_cart | ||
) |
Get the electron temperature gp kernel value for the position and position.
Gets the electron temperature gp kernel for point and index.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
procedure model::model_class::get_ne_af | ( | class (model_class), intent(in) | this | ) |
Gets the electron density profile af array.
Returns the af array for the electron density profile.
[in] | this | A model_class instance. |
procedure model::model_class::get_ne_cart | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Gets the electron density at a cartesian position.
Gets the electron density at a cartesian position. Electron density is computed based on the type of model_class::ne_type.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
procedure model::model_class::get_ne_radial | ( | class (model_class), intent(in) | this, |
real (rprec), intent(in) | s | ||
) |
Gets the electron density at a radial position.
Gets the electron density at a radial position. Electron density is computed based on the type of model_class::ne_type.
[in] | this | A model_class instance. |
[in] | s | Radial position to get the electron density at. |
procedure model::model_class::get_ne_type | ( | class (model_class), intent(in) | this | ) |
Gets the electron density type as a string.
[in] | this | A model_class instance. |
procedure model::model_class::get_param_id | ( | class (model_class), intent(in) | this, |
character (len=*), intent(in) | param_name | ||
) |
Get the id for a parameter.
Gets a model reconstruction parameter. If the id is not a model parameter, it is deferred to the equilibrium.
[in] | this | A model_class instance. |
[in] | param_name | Name of a reconstruction parameter. |
procedure model::model_class::get_param_name | ( | class (model_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Gets the name of a model parameter.
Gets a model reconstruction parameter name. If the id is not a model parameter, it is deferred to the equilibrium.
[in] | this | A model_class instance. |
[in] | id | ID of the parameter. |
procedure model::model_class::get_param_value | ( | class (model_class), intent(in) | this, |
integer, intent(in) | id, | ||
integer, intent(in) | i_index, | ||
integer, intent(in) | j_index | ||
) |
Gets the value of a model parameter.
Gets a model reconstruction parameter value. If the id is not a model parameter, it is deferred to the equilibrium.
[in] | this | A model_class instance. |
[in] | id | ID of the parameter. |
[in] | i_index | The ith index of the parameter. |
[in] | j_index | The jth index of the parameter. |
procedure model::model_class::get_signal_factor | ( | class (model_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Get the scale factor for a signal.
Gets the model scale factor. The scaling defaults to 1.
[in] | this | A model_class instance. |
[in] | index | Index of the scale factor. |
procedure model::model_class::get_signal_offset | ( | class (model_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Get the offset factor for a signal.
Gets the model offset factor. The offset defaults to 0.
[in] | this | A model_class instance. |
[in] | index | Index of the scale factor. |
procedure model::model_class::get_sxrem_af | ( | class (model_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Gets the soft x-ray emissivity profile af array.
Returns the af array for the electron density profile.
[in] | this | A model_class instance. |
[in] | index | Index of the soft x-ray emissivity profile. |
procedure model::model_class::get_sxrem_cart | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
integer, intent(in) | index | ||
) |
Gets the soft x-ray emissivity at a cartesian position.
Gets the soft x-ray emissivity at a cartesian position. Soft x-ray emissivity is computed based on the type of model_class::sxrem_type.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the soft x-ray emissivity at. |
[in] | index | Index of the soft x-ray emissivity model. |
procedure model::model_class::get_sxrem_radial | ( | class (model_class), intent(in) | this, |
real (rprec), intent(in) | s, | ||
integer, intent(in) | index | ||
) |
Gets the soft x-ray emissivity at a radial position.
Gets the soft x-ray emissivity at a radial position. Soft x-ray emissivity is computed based on the type of model_class::sxrem_type.
[in] | this | A model_class instance. |
[in] | s | Radial position to get the soft x-ray emissivity at. |
[in] | index | Index of the soft x-ray emissivity model. |
procedure model::model_class::get_sxrem_ratio | ( | class (model_class), intent(in) | this, |
real (rprec), intent(in) | te | ||
) |
Gets the soft x-ray emissivity ratio.
Gets the soft x-ray emissivity at a radial position. Soft x-ray emissivity is computed based on the type of model_class::sxrem_type.
[in] | this | A model_class instance. |
[in] | r | Radial position to get the soft x-ray emissivity at. |
[in] | length | Distance to the camera. |
[in] | index | Index of the soft x-ray emissivity model. |
procedure model::model_class::get_sxrem_type | ( | class (model_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Gets the soft x-ray emissivity type as a string.
[in] | this | A model_class instance. |
[in] | index | Index of the soft x-ray emissivity model. |
procedure model::model_class::get_te_af | ( | class (model_class), intent(in) | this | ) |
Gets the electron temperature profile af array.
Returns the af array for the electron temperature profile.
[in] | this | A model_class instance. |
procedure model::model_class::get_te_cart | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Gets the electron temperature at a cartesian position.
Gets the electron temperature at a cartesian position. Electron temperature is computed based on the type of model_class::te_type.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
procedure model::model_class::get_te_radial | ( | class (model_class), intent(in) | this, |
real (rprec), intent(in) | s | ||
) |
Gets the electron temperature at a radial position.
Gets the electron temperature at a radial position. Electron temperature is computed based on the type of model_class::te_type.
[in] | this | A model_class instance. |
[in] | s | Radial position to get the electron temperature at. |
procedure model::model_class::get_te_type | ( | class (model_class), intent(in) | this | ) |
Gets the electron temperature type as a string.
[in] | this | A model_class instance. |
procedure model::model_class::get_ti_af | ( | class (model_class), intent(in) | this | ) |
Gets the ion temperature profile af array.
Returns the af array for the ion temperature profile.
[in] | this | A model_class instance. |
procedure model::model_class::get_ti_cart | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Gets the electron temperature at a cartesian position.
Gets the electron temperature at a cartesian position. Electron temperature is computed based on the type of model_class::te_type.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
procedure model::model_class::get_ti_radial | ( | class (model_class), intent(in) | this, |
real (rprec), intent(in) | s | ||
) |
Gets the ion temperature at a radial position.
Gets the ion temperature at a radial position. Electron temperature is computed based on the type of model_class::ti_type.
[in] | this | A model_class instance. |
[in] | s | Radial position to get the ion temperature at. |
procedure model::model_class::get_ti_type | ( | class (model_class), intent(in) | this | ) |
Gets the ion temperature type as a string.
[in] | this | A model_class instance. |
procedure model::model_class::has_vacuum_field | ( | class (model_class), intent(in) | this | ) |
Determines if vacuum field information is available.
[in] | this | A model_class instance. |
procedure model::model_class::is_in_plasma | ( | class (model_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Determines if a point is inside the plasma or outside.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to check. |
procedure model::model_class::is_recon_param | ( | class (model_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Determines if a parameter id is a reconstruction parameter.
Determines if a parameter id is a reconstruction parameter. If the parameter is not a model parameter, it is deferred to the equilibrium.
[in] | this | A model_class instance. |
[in] | id | ID of the parameter. |
procedure model::model_class::limit_path_to_boundary | ( | class (model_class), intent(in) | this, |
type (vertex), pointer | path | ||
) |
Limit an integration path to the boundary.
[in] | this | A model_class instance. |
[in] | path | A chord path. |
class (model_class) function, pointer model::model_class::model_construct | ( | character (len=data_name_length), intent(in) | ne_type, |
character (len=data_name_length), dimension(:), intent(in) | sxrem_type, | ||
character (len=data_name_length), intent(in) | te_type, | ||
character (len=data_name_length), intent(in) | ti_type, | ||
real (rprec), intent(in) | ne_unit, | ||
real (rprec), intent(in) | ne_min, | ||
real (rprec), intent(in) | te_min, | ||
real (rprec), intent(in) | ti_min, | ||
real (rprec), dimension(:), intent(in) | sxrem_min, | ||
real (rprec), intent(in) | pressure_fraction, | ||
type (emission_class), pointer | emission, | ||
class (equilibrium_class), pointer | equilibrium, | ||
real (rprec), dimension(:), intent(in) | sxrem_te, | ||
real (rprec), dimension(:), intent(in) | sxrem_ratio, | ||
real (rprec), intent(in) | resonace_range, | ||
real (rprec), dimension(:), intent(in) | coosig_wgts, | ||
integer, intent(in) | state_flags, | ||
real (rprec), dimension(:), intent(in) | signal_factor, | ||
real (rprec), dimension(:), intent(in) | signal_offset, | ||
class (integration_path_class), pointer | int_params | ||
) |
Construct a model_class containing an equilibrium object.
Allocates memory and initializes a model_class object.
[in] | ne_type | Model type for the electron density. |
[in] | sxrem_type | Model type for the soft x-ray emissivity. |
[in] | te_type | Model type for the electron temperature. |
[in] | ti_type | Model type for the ion temperature. |
[in] | ne_unit | Scaleing of the electron denisty. |
[in] | ne_min | Minimum electron density. |
[in] | te_min | Minimum electron temperature. |
[in] | ti_min | Minimum ion temperature. |
[in] | sxrem_min | Minimum soft x-ray emission. |
[in] | pressure_fraction | Fraction of the pressure provided by electrons. |
[in] | equilibrium | An instance of an equilibrium. |
[in] | sxrem_te | Soft x-ray ratio function te. |
[in] | sxrem_ratio | Soft x-ray ratio function ratio. |
[in] | resonace_range | ECE resonance interval. |
[in] | coosig_wgts | Combination Signal Weights |
[in] | not_converged | If true the equilibrium was constructed in an unconverged state. |
[in] | state_flags | Bitwise flags to indicate which parts of the model changed. |
[in] | signal_factor | Array of signal factors to scale model signals by. |
[in] | signal_offset | Array of signal factors to offset model signals by. |
[in] | int_params | Parameters for the integration method. |
|
final |
Deconstruct a model_class object.
Deallocates memory and uninitializes a model_class object.
[in,out] | this | A model_class instance. |
procedure model::model_class::reset_state | ( | class (model_class), intent(inout) | this | ) |
Reset the internal state of the model.
Clears out the model state flags then resets the equilibrium. This resets the profile grid if they were changed.
[in,out] | this | A equilibrium_class instance. |
procedure model::model_class::restart | ( | class (model_class), intent(inout) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step | ||
) |
Restart the model.
Restarts the model from the result file.
[in,out] | this | A model_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | current_step | Step index to read variables from. |
procedure model::model_class::save_state | ( | class (model_class), intent(inout) | this | ) |
Save the internal state of the model.
Clears out the model state flags then resets the equilibrium.
[in,out] | this | A equilibrium_class instance. |
procedure model::model_class::set_grid_params | ( | class (model_class), intent(inout) | this, |
integer, intent(in) | size | ||
) |
Sets grid parameters.
Sets the start and step size of the radial grids.
[in,out] | this | A model_class instance. |
[in] | size | Number of grid points. |
procedure model::model_class::set_grid_profiles | ( | class (model_class), intent(inout) | this | ) |
Sets grid profile values.
Sets the grided profiles from the current equilibrium mode.
[in,out] | this | A model_class instance. |
procedure model::model_class::set_param | ( | class (model_class), intent(inout) | this, |
integer, intent(in) | id, | ||
integer, intent(in) | i_index, | ||
integer, intent(in) | j_index, | ||
real (rprec), intent(in) | value, | ||
integer, intent(in) | eq_comm | ||
) |
Sets the value of a reconstruction model parameter.
Sets a model reconstruction parameter. If the id is not a model parameter, it is deferred to the equilibrium.
[in,out] | this | A model_class instance. |
[in] | id | ID of the parameter. |
[in] | i_index | The ith index of the parameter. |
[in] | j_index | The jth index of the parameter. |
[in] | value | The value of the parameter. |
[in] | eq_comm | MPI communicator for the child equilibrium processes. |
procedure model::model_class::sync_child | ( | class (model_class), intent(inout) | this, |
integer, intent(in) | index, | ||
integer, intent(in) | recon_comm | ||
) |
Syncronize a child model state to the parent.
Syncs data between a child and the parent process. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A model_class instance. |
[in] | index | Reconstruction rank to sync. |
[in] | recon_comm | MPI communicator for the reconstruction processes. |
procedure model::model_class::sync_state | ( | class (model_class), intent(inout) | this, |
integer, intent(in) | recon_comm | ||
) |
Syncronize the model state to children.
Syncs data between the parent and child processes. If MPI support is not compiled in this subroutine reduces to a no op.
[in,out] | this | A model_class instance. |
[in] | recon_comm | MPI communicator for the reconstruction processes. |
procedure model::model_class::write | ( | class (model_class), intent(in) | this, |
integer, intent(in) | iou | ||
) |
Write out the model to an output file.
Write out information about the model to an output file. This also then calls the equilibrium_write subroutine to write out the equilibrium information as well.
[in] | this | A model_class instance. |
[in] | iou | Input/output unit of the output file. |
procedure model::model_class::write_init_data | ( | class (model_class), intent(in) | this, |
integer, intent(in) | result_ncid | ||
) |
Write inital data to NetCDF result file.
This write the data that doesn't change.
[in] | this | A model_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
procedure model::model_class::write_step_data | ( | class (model_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step | ||
) |
Write step data to NetCDF result file.
This write the data that can change each reconstruction step.
[in] | this | A model_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | current_step | Step index to write variables to. |