V3FIT
Data Types | Functions/Subroutines | Variables
model Module Reference

Defines the base class of the type model_class. The model contains information not specific to the equilibrium. More...

Data Types

type  model_class
 Base class representing a model. More...
 
interface  model_get_gp_ne
 Interface for the model guassian process density profile values. More...
 
interface  model_get_gp_sxrem
 Interface for the mdoel guassian process soft x-ray emissivity profile values. More...
 
interface  model_get_gp_te
 Interface for the model guassian process electron temperature profile values. More...
 
interface  model_get_gp_ti
 Interface for the model guassian process ion temperature profile values. More...
 
interface  model_get_ne
 Interface for the model density profile values. More...
 
interface  model_get_sxrem
 Interface for the model soft x-ray emissivity profile values. More...
 
interface  model_get_te
 Interface for the model electron temperature profile values. More...
 
interface  model_get_ti
 Interface for the model ion temperature profile values. More...
 
interface  model_get_ze
 Interface for the model temperature profile values. More...
 

Functions/Subroutines

type(model_class) function, pointer model_construct (ne_type, sxrem_type, te_type, ti_type, ze_type, ne_unit, ne_min, te_min, ti_min, ze_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. More...
 
subroutine model_destruct (this)
 Deconstruct a model_class object. More...
 
subroutine model_set_param (this, id, i_index, j_index, value, eq_comm)
 Sets the value of a reconstruction model parameter. More...
 
subroutine model_set_grid_params (this, size)
 Sets grid parameters. More...
 
subroutine model_set_grid_profiles (this)
 Sets grid profile values. More...
 
integer function model_get_param_id (this, param_name)
 Get the id for a parameter. More...
 
real(rprec) function model_get_param_value (this, id, i_index, j_index)
 Gets the value of a model parameter. More...
 
character(len=data_name_length) function model_get_param_name (this, id)
 Gets the name of a model parameter. More...
 
integer function model_get_gp_ne_num_hyper_param (this)
 Get the number of electron density gp kernel hyper parameters. More...
 
real(rprec) function, dimension(:), pointer model_get_ne_af (this)
 Gets the electron density profile af array. More...
 
real(rprec) function model_get_gp_ne_ij (this, i, j)
 Get the electron density gp kernel value for the two indicies. More...
 
real(rprec) function model_get_gp_ne_pi (this, x_cart, i)
 Get the electron density gp kernel value for the position and index. More...
 
real(rprec) function model_get_gp_ne_pp (this, x_cart, y_cart)
 Get the electron density gp kernel value for the position and position. More...
 
real(rprec) function model_get_ne_cart (this, x_cart)
 Gets the electron density at a cartesian position. More...
 
real(rprec) function model_get_ne_radial (this, r)
 Gets the electron density at a radial position. More...
 
integer function model_get_gp_te_num_hyper_param (this)
 Get the number of electron temperature gp kernel hyper parameters. More...
 
real(rprec) function, dimension(:), pointer model_get_te_af (this)
 Gets the electron temperature profile af array. More...
 
real(rprec) function model_get_gp_te_ij (this, i, j)
 Get the electron temperature gp kernel value for the two indicies. More...
 
real(rprec) function model_get_gp_te_pi (this, x_cart, i)
 Get the electron temperature gp kernel value for the position and index. More...
 
real(rprec) function model_get_gp_te_pp (this, x_cart, y_cart)
 Get the electron temperature gp kernel value for the position and position. More...
 
real(rprec) function model_get_te_cart (this, x_cart)
 Gets the electron temperature at a cartesian position. More...
 
real(rprec) function model_get_te_radial (this, r)
 Gets the electron temperature at a radial position. More...
 
integer function model_get_gp_ti_num_hyper_param (this)
 Get the number of ion temperature gp kernel hyper parameters. More...
 
real(rprec) function, dimension(:), pointer model_get_ti_af (this)
 Gets the ion temperature profile af array. More...
 
real(rprec) function model_get_gp_ti_ij (this, i, j)
 Get the ion temperature gp kernel value for the two indicies. More...
 
real(rprec) function model_get_gp_ti_pi (this, x_cart, i)
 Get the ion temperature gp kernel value for the position and index. More...
 
real(rprec) function model_get_gp_ti_pp (this, x_cart, y_cart)
 Get the electron temperature gp kernel value for the position and position. More...
 
real(rprec) function model_get_ti_cart (this, x_cart)
 Gets the ion temperature at a cartesian position. More...
 
real(rprec) function model_get_ti_radial (this, r)
 Gets the ion temperature at a radial position. More...
 
real(rprec) function model_get_ze_cart (this, x_cart)
 Gets the effective charge at a cartesian position. More...
 
real(rprec) function model_get_ze_radial (this, r)
 Gets the effective charge at a radial position. More...
 
integer function model_get_gp_sxrem_num_hyper_param (this, index)
 Get the number of soft x-ray emission gp kernel hyper parameters. More...
 
real(rprec) function, dimension(:), pointer model_get_sxrem_af (this, index)
 Gets the soft x-ray emissivity profile af array. More...
 
real(rprec) function model_get_gp_sxrem_ij (this, i, j, index)
 Get the soft x-ray emissivity gp kernel value for the two indicies. More...
 
real(rprec) function model_get_gp_sxrem_pi (this, x_cart, i, index)
 Get the soft x-ray emissivity gp kernel value for the position and index. More...
 
real(rprec) function model_get_gp_sxrem_pp (this, x_cart, y_cart, index)
 Get the soft x-ray emissivity gp kernel value for the position and position. More...
 
real(rprec) function model_get_sxrem_cart (this, x_cart, index)
 Gets the soft x-ray emissivity at a cartesian position. More...
 
real(rprec) function model_get_sxrem_radial (this, r, index)
 Gets the soft x-ray emissivity at a radial position. More...
 
real(rprec) function model_get_sxrem_ratio (this, te)
 Gets the soft x-ray emissivity ratio. More...
 
character(len=data_name_length) function model_get_ne_type (this)
 Gets the electron density type as a string. More...
 
character(len=data_name_length) function model_get_te_type (this)
 Gets the electron temperature type as a string. More...
 
character(len=data_name_length) function model_get_ti_type (this)
 Gets the ion temperature type as a string. More...
 
character(len=data_name_length) function model_get_ze_type (this)
 Gets the effective charge type as a string. More...
 
character(len=data_name_length) function model_get_sxrem_type (this, index)
 Gets the soft x-ray emissivity type as a string. More...
 
real(rprec) function model_get_signal_factor (this, index)
 Get the scale factor for a signal. More...
 
real(rprec) function model_get_signal_offset (this, index)
 Get the offset factor for a signal. More...
 
logical function model_is_recon_param (this, id)
 Determines if a parameter id is a reconstruction parameter. More...
 
subroutine model_reset_state (this)
 Reset the internal state of the model. More...
 
subroutine model_save_state (this)
 Save the internal state of the model. More...
 
logical function model_converge (this, num_iter, iou, eq_comm, param_name)
 Solves the model. More...
 
subroutine model_write (this, iou)
 Write out the model to an output file. More...
 
subroutine model_def_result (this, result_ncid, maxnsteps_dim_id, string_len_dim_id)
 Define NetCDF variables for the result file. More...
 
subroutine model_write_init_data (this, result_ncid)
 Write inital data to NetCDF result file. More...
 
subroutine model_write_step_data (this, result_ncid, current_step)
 Write step data to NetCDF result file. More...
 
subroutine model_restart (this, result_ncid, current_step)
 Restart the model. More...
 
subroutine model_sync_state (this, recon_comm)
 Syncronize the model state to children. More...
 
subroutine model_sync_child (this, index, recon_comm)
 Syncronize a child model state to the parent. More...
 

Variables

integer, parameter, private model_none_type = -1
 No model.
 
integer, parameter, private model_ne_type = 0
 Electron denisty model.
 
integer, parameter, private model_ne_te_p_type = 1
 Electron denisty model is derived from the temperature and pressure.
 
integer, parameter, private model_sxrem_type = 0
 Soft X-ray Emissivity.
 
integer, parameter, private model_sxrem_te_ne_type = 1
 Soft X-ray Emissivity model is derived from the density and temperature.
 
integer, parameter, private model_te_type = 0
 Electron temperature model.
 
integer, parameter, private model_te_ne_p_type = 1
 Electron temperature model is derived from the density and pressure.
 
integer, parameter, private model_ti_type = 0
 Ion temperature model.
 
integer, parameter, private model_ze_type = 0
 Effective charge model.
 
integer, parameter model_ne_unit_id = 0
 Parameter id for the electron density units.
 
integer, parameter model_ne_min_id = 1
 Parameter id for the minimum electron density.
 
integer, parameter model_te_min_id = 2
 Parameter id for the minimum electron temperature.
 
integer, parameter model_ti_min_id = 3
 Parameter id for the minimum electron temperature.
 
integer, parameter model_pressure_fraction_id = 4
 Parameter id for the electrion fraction of the pressure.
 
integer, parameter model_ze_min_id = 5
 Parameter id for Z effective.
 
integer, parameter model_sxrem_min_id = 6
 Parameter id for the electrion fraction of the pressure.
 
integer, parameter model_coosig_wgts_id = 7
 Parameter id for the combination signal weights.
 
integer, parameter model_signal_factor_id = 8
 Parameter id for the modeled signal scale factors.
 
integer, parameter model_signal_offset_id = 9
 Parameter id for the modeled signal offset factors.
 
integer, parameter model_ne_grid_id = 10
 Parameter id for the electrion density grid.
 
integer, parameter model_te_grid_id = 11
 Parameter id for the electrion temperature grid.
 
integer, parameter model_ti_grid_id = 12
 Parameter id for the ion temperature grid.
 
integer, parameter model_sxrem_grid_id = 13
 Parameter id for the soft x-ray emissivity grid.
 
integer, parameter model_ze_grid_id = 14
 Parameter id for the effective charge grid.
 
real(rprec), parameter ev_per_joule = one/1.602e-19_rprec
 Conversion from Joules to eV.
 

Detailed Description

Defines the base class of the type model_class. The model contains information not specific to the equilibrium.

Function/Subroutine Documentation

◆ model_construct()

type (model_class) function, pointer model::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,
character (len=data_name_length), intent(in)  ze_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), intent(in)  ze_min,
real (rprec), dimension(:), intent(in)  sxrem_min,
real (rprec), intent(in)  pressure_fraction,
type (emission_class), pointer  emission,
type (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(:)  signal_factor,
real (rprec), dimension(:)  signal_offset,
type (path_int_class), pointer  int_params 
)

Construct a model_class containing an equilibrium object.

Allocates memory and initializes a model_class object.

Parameters
[in]ne_typeModel type for the electron density.
[in]sxrem_typeModel type for the soft x-ray emissivity.
[in]te_typeModel type for the electron temperature.
[in]ti_typeModel type for the ion temperature.
[in]ze_typeModel type for the effective charge.
[in]ne_unitScaleing of the electron denisty.
[in]ne_minMinimum electron density.
[in]te_minMinimum electron temperature.
[in]ti_minMinimum ion temperature.
[in]ze_minMinimum effective charge.
[in]sxrem_minMinimum soft x-ray emission.
[in]pressure_fractionFraction of the pressure provided by electrons.
[in]equilibriumAn instance of an equilibrium.
[in]sxrem_teSoft x-ray ratio function te.
[in]sxrem_ratioSoft x-ray ratio function ratio.
[in]resonace_rangeECE resonance interval.
[in]coosig_wgtsCombination Signal Weights
[in]not_convergedIf true the equilibrium was constructed in an unconverged state.
[in]state_flagsBitwise flags to indicate which parts of the model changed.
[in]signal_factorArray of signal factors to scale model signals by.
[in]signal_offsetArray of signal factors to offset model signals by.
[in]int_paramsParameters for the integration method.
Returns
A pointer to a constructed model_class object.
Todo:
FIXME: Name here shouldn't have vmec in it

Definition at line 341 of file model.f.

◆ model_converge()

logical function model::model_converge ( type (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.

Parameters
[in,out]thisA model_class instance.
[in,out]num_iterCounter to track the number of iterations.
[in]iouInput/output unit of the file to write logs to.
[in]eq_commMPI communicator pool for the equilibrium.
[in]param_nameName of the peturbed parameter.
Returns
True if the convergece was sucessful and false otherwise.

Definition at line 2707 of file model.f.

◆ model_def_result()

subroutine model::model_def_result ( type (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.

Parameters
[in]thisA model_class instance.
[in]result_ncidNetCDF file id of the result file.
[in]maxnsetps_dim_idNetCDF dimension id of the number of steps dimension.

Definition at line 2898 of file model.f.

◆ model_destruct()

subroutine model::model_destruct ( type (model_class), pointer  this)

Deconstruct a model_class object.

Deallocates memory and uninitializes a model_class object.

Parameters
[in,out]thisA model_class instance.

Definition at line 553 of file model.f.

◆ model_get_gp_ne_ij()

real (rprec) function model::model_get_gp_ne_ij ( type (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.

Parameters
[in]thisA model_class instance.
[in]iith profile position.
[in]jjth profile position.
Returns
The value of the gp kernel function for i, j.

Definition at line 1223 of file model.f.

◆ model_get_gp_ne_num_hyper_param()

integer function model::model_get_gp_ne_num_hyper_param ( type (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.

Parameters
[in]thisA model_class instance.
Returns
Number of kernel hyper parameters.

Definition at line 1162 of file model.f.

◆ model_get_gp_ne_pi()

real (rprec) function model::model_get_gp_ne_pi ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the electron density at.
[in]iith profile position.
Returns
The value of the gp kernel function for x_cart and i.

Definition at line 1259 of file model.f.

◆ model_get_gp_ne_pp()

real (rprec) function model::model_get_gp_ne_pp ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the kernel at.
[in]y_cartCartesian position to get the kernel at.
Returns
The value of the gp kernel function for x_cart and y_cart.

Definition at line 1296 of file model.f.

◆ model_get_gp_sxrem_ij()

real (rprec) function model::model_get_gp_sxrem_ij ( type (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.

Parameters
[in]thisA model_class instance.
[in]iith profile position.
[in]jjth profile position.
[in]indexIndex of the soft x-ray emissivity profile.
Returns
The value of the gp kernel function for i, j.

Definition at line 2101 of file model.f.

◆ model_get_gp_sxrem_num_hyper_param()

integer function model::model_get_gp_sxrem_num_hyper_param ( type (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.

Parameters
[in]thisA model_class instance.
[in]indexIndex of the soft x-ray emissivity profile.
Returns
Number of kernel hyper parameters.

Definition at line 2034 of file model.f.

◆ model_get_gp_sxrem_pi()

real (rprec) function model::model_get_gp_sxrem_pi ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the electron temperature at.
[in]iith profile position.
[in]indexIndex of the soft x-ray emissivity profile.
Returns
The value of the gp kernel function for x_cart and i.

Definition at line 2140 of file model.f.

◆ model_get_gp_sxrem_pp()

real (rprec) function model::model_get_gp_sxrem_pp ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the kernel at.
[in]y_cartCartesian position to get the kernel at.
[in]indexIndex of the soft x-ray emissivity profile to use.
Returns
The value of the gp kernel function for x_cart and y_cart.

Definition at line 2179 of file model.f.

◆ model_get_gp_te_ij()

real (rprec) function model::model_get_gp_te_ij ( type (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.

Parameters
[in]thisA model_class instance.
[in]iith profile position.
[in]jjth profile position.
Returns
The value of the gp kernel function for i, j.

Definition at line 1497 of file model.f.

◆ model_get_gp_te_num_hyper_param()

integer function model::model_get_gp_te_num_hyper_param ( type (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.

Parameters
[in]thisA model_class instance.
Returns
Number of kernel hyper parameters.

Definition at line 1436 of file model.f.

◆ model_get_gp_te_pi()

real (rprec) function model::model_get_gp_te_pi ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the electron temperature at.
[in]iith profile position.
Returns
The value of the gp kernel function for x_cart and i.

Definition at line 1533 of file model.f.

◆ model_get_gp_te_pp()

real (rprec) function model::model_get_gp_te_pp ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the kernel at.
[in]y_cartCartesian position to get the kernel at.
Returns
The value of the gp kernel function for x_cart and y_cart.

Definition at line 1568 of file model.f.

◆ model_get_gp_ti_ij()

real (rprec) function model::model_get_gp_ti_ij ( type (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.

Parameters
[in]thisA model_class instance.
[in]iith profile position.
[in]jjth profile position.
Returns
The value of the gp kernel function for i, j.

Definition at line 1766 of file model.f.

◆ model_get_gp_ti_num_hyper_param()

integer function model::model_get_gp_ti_num_hyper_param ( type (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.

Parameters
[in]thisA model_class instance.
Returns
Number of kernel hyper parameters.

Definition at line 1705 of file model.f.

◆ model_get_gp_ti_pi()

real (rprec) function model::model_get_gp_ti_pi ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the ion temperature at.
[in]iith profile position.
Returns
The value of the gp kernel function for x_cart and i.

Definition at line 1801 of file model.f.

◆ model_get_gp_ti_pp()

real (rprec) function model::model_get_gp_ti_pp ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the kernel at.
[in]y_cartCartesian position to get the kernel at.
Returns
The value of the gp kernel function for x_cart and y_cart.

Definition at line 1836 of file model.f.

◆ model_get_ne_af()

real (rprec) function, dimension(:), pointer model::model_get_ne_af ( type (model_class), intent(in)  this)

Gets the electron density profile af array.

Returns the af array for the electron density profile.

Parameters
[in]thisA model_class instance.
Returns
Number of kernel hyper parameters.

Definition at line 1192 of file model.f.

◆ model_get_ne_cart()

real (rprec) function model::model_get_ne_cart ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the electron density at.
Returns
The electron density at x_cart.

Definition at line 1331 of file model.f.

◆ model_get_ne_radial()

real (rprec) function model::model_get_ne_radial ( type (model_class), intent(in)  this,
real (rprec), intent(in)  r 
)

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.

Parameters
[in]thisA model_class instance.
[in]rRadial position to get the electron density at.
Returns
The electron density at r.

Definition at line 1384 of file model.f.

◆ model_get_ne_type()

character (len=data_name_length) function model::model_get_ne_type ( type (model_class), intent(in)  this)

Gets the electron density type as a string.

Parameters
[in]thisA model_class instance.
Returns
A string description of the electron density type.

Definition at line 2347 of file model.f.

◆ model_get_param_id()

integer function model::model_get_param_id ( type (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.

Parameters
[in]thisA model_class instance.
[in]param_nameName of a reconstruction parameter.
Returns
The id for a reconstruction parameter.

Definition at line 885 of file model.f.

◆ model_get_param_name()

character(len=data_name_length) function model::model_get_param_name ( type (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.

Parameters
[in]thisA model_class instance.
[in]idID of the parameter.
Returns
The name of the parameter.

Definition at line 1081 of file model.f.

◆ model_get_param_value()

real (rprec) function model::model_get_param_value ( type (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.

Parameters
[in]thisA model_class instance.
[in]idID of the parameter.
[in]i_indexThe ith index of the parameter.
[in]j_indexThe jth index of the parameter.
Returns
The value of the parameter.
Note
Model parameter do not use the indicies. However an equilibrium might.

Definition at line 970 of file model.f.

◆ model_get_signal_factor()

real (rprec) function model::model_get_signal_factor ( type (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.

Parameters
[in]thisA model_class instance.
[in]indexIndex of the scale factor.
Returns
Scale factor value.

Definition at line 2531 of file model.f.

◆ model_get_signal_offset()

real (rprec) function model::model_get_signal_offset ( type (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.

Parameters
[in]thisA model_class instance.
[in]indexIndex of the scale factor.
Returns
Scale factor value.

Definition at line 2565 of file model.f.

◆ model_get_sxrem_af()

real (rprec) function, dimension(:), pointer model::model_get_sxrem_af ( type (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.

Parameters
[in]thisA model_class instance.
[in]indexIndex of the soft x-ray emissivity profile.
Returns
Number of kernel hyper parameters.

Definition at line 2067 of file model.f.

◆ model_get_sxrem_cart()

real (rprec) function model::model_get_sxrem_cart ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the soft x-ray emissivity at.
[in]indexIndex of the soft x-ray emissivity model.
Returns
The soft x-ray emissivity at x_cart.

Definition at line 2217 of file model.f.

◆ model_get_sxrem_radial()

real (rprec) function model::model_get_sxrem_radial ( type (model_class), intent(in)  this,
real (rprec), intent(in)  r,
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.

Parameters
[in]thisA model_class instance.
[in]rRadial position to get the soft x-ray emissivity at.
[in]indexIndex of the soft x-ray emissivity model.
Returns
The soft x-ray emissivity at r.

Definition at line 2267 of file model.f.

◆ model_get_sxrem_ratio()

real (rprec) function model::model_get_sxrem_ratio ( type (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.

Parameters
[in]thisA model_class instance.
[in]rRadial position to get the soft x-ray emissivity at.
[in]lengthDistance to the camera.
[in]indexIndex of the soft x-ray emissivity model.
Returns
The soft x-ray emissivity at r.

Definition at line 2318 of file model.f.

◆ model_get_sxrem_type()

character (len=data_name_length) function model::model_get_sxrem_type ( type (model_class), intent(in)  this,
integer, intent(in)  index 
)

Gets the soft x-ray emissivity type as a string.

Parameters
[in]thisA model_class instance.
[in]indexIndex of the soft x-ray emissivity model.
Returns
A string description of the soft x-ray emissivity type.

Definition at line 2490 of file model.f.

◆ model_get_te_af()

real (rprec) function, dimension(:), pointer model::model_get_te_af ( type (model_class), intent(in)  this)

Gets the electron temperature profile af array.

Returns the af array for the electron temperature profile.

Parameters
[in]thisA model_class instance.
Returns
Number of kernel hyper parameters.

Definition at line 1466 of file model.f.

◆ model_get_te_cart()

real (rprec) function model::model_get_te_cart ( type (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.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the electron temperature at.
Returns
The electron temperature at x_cart.

Definition at line 1602 of file model.f.

◆ model_get_te_radial()

real (rprec) function model::model_get_te_radial ( type (model_class), intent(in)  this,
real (rprec), intent(in)  r 
)

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.

Parameters
[in]thisA model_class instance.
[in]rRadial position to get the electron temperature at.
Returns
The electron temperature at r.

Definition at line 1654 of file model.f.

◆ model_get_te_type()

character (len=data_name_length) function model::model_get_te_type ( type (model_class), intent(in)  this)

Gets the electron temperature type as a string.

Parameters
[in]thisA model_class instance.
Returns
A string description of the electron temperature type.

Definition at line 2384 of file model.f.

◆ model_get_ti_af()

real (rprec) function, dimension(:), pointer model::model_get_ti_af ( type (model_class), intent(in)  this)

Gets the ion temperature profile af array.

Returns the af array for the ion temperature profile.

Parameters
[in]thisA model_class instance.
Returns
Number of kernel hyper parameters.

Definition at line 1735 of file model.f.

◆ model_get_ti_cart()

real (rprec) function model::model_get_ti_cart ( type (model_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart 
)

Gets the ion temperature at a cartesian position.

Gets the ion temperature at a cartesian position. Ion temperature is computed based on the type of model_class::ti_type.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the ion temperature at.
Returns
The ion temperature at x_cart.

Definition at line 1870 of file model.f.

◆ model_get_ti_radial()

real (rprec) function model::model_get_ti_radial ( type (model_class), intent(in)  this,
real (rprec), intent(in)  r 
)

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.

Parameters
[in]thisA model_class instance.
[in]rRadial position to get the ion temperature at.
Returns
The ion temperature at r.

Definition at line 1911 of file model.f.

◆ model_get_ti_type()

character (len=data_name_length) function model::model_get_ti_type ( type (model_class), intent(in)  this)

Gets the ion temperature type as a string.

Parameters
[in]thisA model_class instance.
Returns
A string description of the ion temperature type.

Definition at line 2421 of file model.f.

◆ model_get_ze_cart()

real (rprec) function model::model_get_ze_cart ( type (model_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart 
)

Gets the effective charge at a cartesian position.

Gets the effective charge at a cartesian position. Effective charge is computed based on the type of model_class::ze_type.

Parameters
[in]thisA model_class instance.
[in]x_cartCartesian position to get the effective charge at.
Returns
The effective charge at x_cart.

Definition at line 1952 of file model.f.

◆ model_get_ze_radial()

real (rprec) function model::model_get_ze_radial ( type (model_class), intent(in)  this,
real (rprec), intent(in)  r 
)

Gets the effective charge at a radial position.

Gets the effective charge at a radial position. The charge is computed based on the type of model_class::ze_type.

Parameters
[in]thisA model_class instance.
[in]rRadial position to get the effective charge at.
Returns
The effective charge at r.

Definition at line 1993 of file model.f.

◆ model_get_ze_type()

character (len=data_name_length) function model::model_get_ze_type ( type (model_class), intent(in)  this)

Gets the effective charge type as a string.

Parameters
[in]thisA model_class instance.
Returns
A string description of the effective charge type.

Definition at line 2455 of file model.f.

◆ model_is_recon_param()

logical function model::model_is_recon_param ( type (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.

Parameters
[in]thisA model_class instance.
[in]idID of the parameter.
Returns
True if the id is a reconstruction parameter and false if not.

Definition at line 2603 of file model.f.

◆ model_reset_state()

subroutine model::model_reset_state ( type (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.

Parameters
[in,out]thisA equilibrium_class instance.

Definition at line 2647 of file model.f.

◆ model_restart()

subroutine model::model_restart ( type (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.

Parameters
[in,out]thisA model_class instance.
[in]result_ncidNetCDF file id of the result file.
[in]current_stepStep index to read variables from.

Definition at line 3285 of file model.f.

◆ model_save_state()

subroutine model::model_save_state ( type (model_class), intent(inout)  this)

Save the internal state of the model.

Clears out the model state flags then resets the equilibrium.

Parameters
[in,out]thisA equilibrium_class instance.

Definition at line 2675 of file model.f.

◆ model_set_grid_params()

subroutine model::model_set_grid_params ( type (model_class), intent(inout)  this,
integer, intent(in)  size 
)

Sets grid parameters.

Sets the start and step size of the radial grids.

Parameters
[in,out]thisA model_class instance.
[in]sizeNumber of grid points.

Definition at line 777 of file model.f.

◆ model_set_grid_profiles()

subroutine model::model_set_grid_profiles ( type (model_class), intent(inout)  this)

Sets grid profile values.

Sets the grided profiles from the current equilibrium mode.

Parameters
[in,out]thisA model_class instance.

Definition at line 808 of file model.f.

◆ model_set_param()

subroutine model::model_set_param ( type (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.

Parameters
[in,out]thisA model_class instance.
[in]idID of the parameter.
[in]i_indexThe ith index of the parameter.
[in]j_indexThe jth index of the parameter.
[in]valueThe value of the parameter.
[in]eq_commMPI communicator for the child equilibrium processes.
Note
Model parameter do not use the indicies. However an equilibrium might.

Definition at line 658 of file model.f.

◆ model_sync_child()

subroutine model::model_sync_child ( type (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.

Parameters
[in,out]thisA model_class instance.
[in]indexReconstruction rank to sync.
[in]recon_commMPI communicator for the reconstruction processes.

Definition at line 3487 of file model.f.

◆ model_sync_state()

subroutine model::model_sync_state ( type (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.

Parameters
[in,out]thisA model_class instance.
[in]recon_commMPI communicator for the reconstruction processes.

Definition at line 3435 of file model.f.

◆ model_write()

subroutine model::model_write ( type (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.

Parameters
[in]thisA model_class instance.
[in]iouInput/output unit of the output file.

Definition at line 2782 of file model.f.

◆ model_write_init_data()

subroutine model::model_write_init_data ( type (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.

Parameters
[in]thisA model_class instance.
[in]result_ncidNetCDF file id of the result file.

Definition at line 3066 of file model.f.

◆ model_write_step_data()

subroutine model::model_write_step_data ( type (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.

Parameters
[in]thisA model_class instance.
[in]result_ncidNetCDF file id of the result file.
[in]current_stepStep index to write variables to.

Definition at line 3142 of file model.f.