Stellarator-Tools
|
Defines the base class of the type equilibrium_class. Equilibrium is an abstract interface to the equilibrium solver. Every method is meant to be overwritten by a subclass method with a few exceptions. For instance a vacuum equilibrium could use the default return values for equilibrium_get_ne, equilibrium_get_te and equilibrium_get_sxrem methods. More...
Data Types | |
type | equilibrium_class |
Base class representing a equilibrium. More... | |
interface | equilibrium_construct |
Interface for the construction of equilibrium_class types using equilibrium_construct_vmec, equilibrium_construct_vacuum or equilibrium_construct_siesta. More... | |
Functions/Subroutines | |
type(equilibrium_class) function, pointer | equilibrium_construct (force_solve) |
Construct a equilibrium_class. More... | |
subroutine | equilibrium_construct_sub (this, force_solve) |
Construct a equilibrium_class. More... | |
subroutine | equilibrium_destruct (this) |
Deconstruct a equilibrium_class object. More... | |
subroutine | equilibrium_set_param (this, id, i_index, j_index, value, eq_comm, state_flags) |
Sets the value of a reconstruction equilibrium parameter. More... | |
subroutine | equilibrium_set_magnetic_cache_response (this, response_object, state_flags) |
Sets the magnetic cache of the equilibrium for the magnetic response. More... | |
subroutine | equilibrium_set_magnetic_cache_point (this, use_axi, state_flags) |
Sets the magnetic cache of the equilibrium for points. More... | |
recursive character(len=data_name_length) function | equilibrium_get_type (this) |
Checks if a parameter id is a reconstruction parameter. More... | |
integer function | equilibrium_get_param_id (this, param_name) |
Get the id for a reconstruction parameter. More... | |
character(len=data_name_length) function | equilibrium_get_param_name (this, id) |
Gets the name of a reconstruction equilibrium parameter. More... | |
real(rprec) function | equilibrium_get_param_value (this, id, i_index, j_index) |
Gets the value of a reconstruction equilibrium parameter. More... | |
integer function | equilibrium_get_gp_ne_num_hyper_param (this) |
Get the number of electron density gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | equilibrium_get_ne_af (this) |
Get the electron density profile af array. More... | |
real(rprec) function | equilibrium_get_gp_ne_ij (this, i, j) |
Get the electron density gp kernel value for the two indicies. More... | |
real(rprec) function | equilibrium_get_gp_ne_pi (this, x_cart, i) |
Get the electron density gp kernel value for the position and index. More... | |
real(rprec) function | equilibrium_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 | equilibrium_get_ne_cart (this, x_cart) |
Gets the electron density at a cartesian position. More... | |
real(rprec) function | equilibrium_get_ne_radial (this, s) |
Gets the electron density at a radial position. More... | |
integer function | equilibrium_get_gp_te_num_hyper_param (this) |
Get the number of electron temperature gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | equilibrium_get_te_af (this) |
Get the electron temperature profile af array. More... | |
real(rprec) function | equilibrium_get_gp_te_ij (this, i, j) |
Get the electron temperature gp kernel value for the two indicies. More... | |
real(rprec) function | equilibrium_get_gp_te_pi (this, x_cart, i) |
Get the electron temperature gp kernel value for the position and index. More... | |
real(rprec) function | equilibrium_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 | equilibrium_get_te_cart (this, x_cart) |
Gets the electron temperature at a cartesian position. More... | |
real(rprec) function | equilibrium_get_te_radial (this, s) |
Gets the electron temperature at a radial position. More... | |
integer function | equilibrium_get_gp_ti_num_hyper_param (this) |
Get the number of ion temperature gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | equilibrium_get_ti_af (this) |
Get the ion temperature profile af array. More... | |
real(rprec) function | equilibrium_get_gp_ti_ij (this, i, j) |
Get the ion temperature gp kernel value for the two indicies. More... | |
real(rprec) function | equilibrium_get_gp_ti_pi (this, x_cart, i) |
Get the ion temperature gp kernel value for the position and index. More... | |
real(rprec) function | equilibrium_get_gp_ti_pp (this, x_cart, y_cart) |
Get the ion temperature gp kernel value for the position and position. More... | |
real(rprec) function | equilibrium_get_ti_cart (this, x_cart) |
Gets the ion temperature at a cartesian position. More... | |
real(rprec) function | equilibrium_get_ti_radial (this, s) |
Gets the ion temperature at a radial position. More... | |
integer function | equilibrium_get_gp_sxrem_num_hyper_param (this, index) |
Get the number of soft x-ray emissivity gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | equilibrium_get_sxrem_af (this, index) |
Get the soft x-ray emissivity profile af array. More... | |
real(rprec) function | equilibrium_get_gp_sxrem_ij (this, i, j, index) |
Get the electron density gp kernel value for the two indicies. More... | |
real(rprec) function | equilibrium_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 | equilibrium_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 | equilibrium_get_sxrem_cart (this, x_cart, index) |
Gets the soft x-ray emissivity at a cartesian position. More... | |
real(rprec) function | equilibrium_get_sxrem_radial (this, s, index) |
Gets the soft x-ray emissivity at a radial position. More... | |
real(rprec) function | equilibrium_get_p_cart (this, x_cart, normalize) |
Gets the plasma pressure at a cartesian position. More... | |
real(rprec) function | equilibrium_get_p_radial (this, s, normalize) |
Gets the plasma pressure at a radial position. More... | |
real(rprec) function, dimension(3) | equilibrium_get_b_vec (this, x_cart, cyl) |
Gets the magnetic field vector at a position. More... | |
real(rprec) function | equilibrium_get_int_b_dphi (this, s, theta) |
Gets the loop integrated magnetic field at a position. More... | |
integer function | equilibrium_get_plasma_edge (this, phi, r, z) |
Gets the r and z positions of the outer surface at a toroidal angle. More... | |
real(rprec) function, dimension(:,:,:), pointer | equilibrium_get_magnetic_volume_rgrid (this) |
Get volume magnetic volume integration radial grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | equilibrium_get_magnetic_volume_zgrid (this) |
Get volume magnetic volume integration z grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | equilibrium_get_magnetic_volume_jrgrid (this) |
Get volume magnetic volume integration jr grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | equilibrium_get_magnetic_volume_jphigrid (this) |
Get volume magnetic volume integration jphi grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | equilibrium_get_magnetic_volume_jzgrid (this) |
Get volume magnetic volume integration jz grid points. More... | |
real(rprec) function | equilibrium_get_volume_int_element (this) |
Get volume integration element. More... | |
real(rprec) function, dimension(:,:), pointer | equilibrium_get_con_surface_krgrid (this) |
Get the conducting surface integration kr grid points. More... | |
real(rprec) function, dimension(:,:), pointer | equilibrium_get_con_surface_kphigrid (this) |
Get the conducting surface integration kphi grid points. More... | |
real(rprec) function, dimension(:,:), pointer | equilibrium_get_con_surface_kzgrid (this) |
Get the conducting surface integration kz grid points. More... | |
real(rprec) function | equilibrium_get_area_int_element (this) |
Get area integration element. More... | |
real(rprec) function, dimension(:), pointer | equilibrium_get_ext_currents (this, num_currents, scale_currents) |
Get external current. More... | |
real(rprec) function, dimension(3) | equilibrium_get_ext_b_plasma (this, position, axi_only) |
Get external plasma magnetic field. More... | |
integer function | equilibrium_get_grid_size (this) |
Get radial grid size. More... | |
real(rprec) function | equilibrium_get_grid_start (this) |
Get start of the radial grid. More... | |
real(rprec) function | equilibrium_get_grid_stop (this) |
Get stop of the radial grid. More... | |
logical function | equilibrium_is_scaler_value (this, id) |
Checks if a parameter id is a scaler value. More... | |
logical function | equilibrium_is_2d_array (this, id) |
Checks if a parameter id is a 2d array. More... | |
logical function | equilibrium_is_recon_param (this, id) |
Checks if a parameter id is a reconstruction parameter. More... | |
logical function | equilibrium_is_using_point (this) |
Checks if the point magnetics are being used. More... | |
logical function | equilibrium_has_vacuum_field (this) |
Determines if vacuum field information is available. More... | |
logical function | equilibrium_is_in_plasma (this, x_cart) |
Determines if a point is inside the plasma or outside. More... | |
type(vertex) function, pointer | equilibrium_limit_path_to_boundary (this, path) |
Limit an integration path to the boundary. More... | |
logical function | equilibrium_converge (this, num_iter, iou, eq_comm, state_flags) |
Solves the equilibrium. More... | |
subroutine | equilibrium_read_vac_file (this, index, eq_comm) |
Loads the vacuum magnetic field file. More... | |
subroutine | equilibrium_save_state (this) |
Save the internal state of the equilibrium. More... | |
subroutine | equilibrium_reset_state (this) |
Reset the internal state of the equilibrium. More... | |
subroutine | equilibrium_write (this, iou) |
Write out the equilibrium to an output file. More... | |
subroutine | equilibrium_write_input (this, current_step) |
Write out the equilibrium to an output file. More... | |
subroutine | equilibrium_def_result (this, result_ncid, maxnsetps_dim_id) |
Define NetCDF variables for the result file. More... | |
subroutine | equilibrium_write_init_data (this, result_ncid) |
Write inital data to NetCDF result file. More... | |
subroutine | equilibrium_write_step_data (this, result_ncid, current_step) |
Write step data to NetCDF result file. More... | |
subroutine | equilibrium_restart (this, result_ncid, current_step) |
Restart equilibrium. More... | |
subroutine | equilibrium_sync_state (this, recon_comm) |
Syncronize the equilibrium state to children. More... | |
subroutine | equilibrium_sync_child (this, index, recon_comm) |
Syncronize a child equilibrium state to the parent. More... | |
Defines the base class of the type equilibrium_class. Equilibrium is an abstract interface to the equilibrium solver. Every method is meant to be overwritten by a subclass method with a few exceptions. For instance a vacuum equilibrium could use the default return values for equilibrium_get_ne, equilibrium_get_te and equilibrium_get_sxrem methods.
type (equilibrium_class) function, pointer equilibrium::equilibrium_construct | ( | logical, intent(in) | force_solve | ) |
Construct a equilibrium_class.
Allocates memory for a equilibrium_class object.
[in] | vmec_object | An instance of a vmec_equilibrium subclass. |
[in] | force_solve | If true, forces the equilbirum to resolve every time. |
subroutine equilibrium::equilibrium_construct_sub | ( | class (equilibrium_class), intent(inout) | this, |
logical, intent(in) | force_solve | ||
) |
Construct a equilibrium_class.
Initializes a equilibrium_class object.
[in] | vmec_object | An instance of a vmec_equilibrium subclass. |
[in] | force_solve | If true, forces the equilbirum to resolve every time. |
logical function equilibrium::equilibrium_converge | ( | class (equilibrium_class), intent(inout) | this, |
integer, intent(inout) | num_iter, | ||
integer, intent(in) | iou, | ||
integer, intent(in) | eq_comm, | ||
integer, intent(in) | state_flags | ||
) |
Solves the equilibrium.
This method is virtual. The actual solving of the equilibrium should be handled by a subclass method.
[in,out] | this | A equilibrium_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] | state_flags | Bitwise flags to indicate which parts of the model changed. |
subroutine equilibrium::equilibrium_def_result | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | maxnsetps_dim_id | ||
) |
Define NetCDF variables for the result file.
This method is virtual. The actual defining of the equilibrium variables should be handled by a subclass method.
[in] | this | A equilibrium_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. |
subroutine equilibrium::equilibrium_destruct | ( | type (equilibrium_class), intent(inout) | this | ) |
Deconstruct a equilibrium_class object.
Deallocates memory and uninitializes a equilibrium_class object.
[in,out] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_area_int_element | ( | class (equilibrium_class), intent(in) | this | ) |
Get area integration element.
This method is virtual. The actual getting of the area integration element should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(3) equilibrium::equilibrium_get_b_vec | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
logical, intent(in) | cyl | ||
) |
Gets the magnetic field vector at a position.
This method is virtual. The actual getting of the magnetic field vector should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the magnetic field vector at. |
[in] | cyl | Flag that specifies if the bfield should be returned in cartesian or cylindical coordinates. |
real (rprec) function, dimension(:,:), pointer equilibrium::equilibrium_get_con_surface_kphigrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get the conducting surface integration kphi grid points.
This method is virtual. The actual getting of the kphi grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:,:), pointer equilibrium::equilibrium_get_con_surface_krgrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get the conducting surface integration kr grid points.
This method is virtual. The actual getting of the kr grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:,:), pointer equilibrium::equilibrium_get_con_surface_kzgrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get the conducting surface integration kz grid points.
This method is virtual. The actual getting of the kz grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(3) equilibrium::equilibrium_get_ext_b_plasma | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | position, | ||
logical, intent(in) | axi_only | ||
) |
Get external plasma magnetic field.
This method is virtual. The actual getting of the external current should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | position | Position to compute the fields at. |
[in] | axi_only | Gives only the axisymmtric component of the magnetic field. |
real (rprec) function, dimension(:), pointer equilibrium::equilibrium_get_ext_currents | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | num_currents, | ||
logical, intent(out) | scale_currents | ||
) |
Get external current.
This method is virtual. The actual getting of the external current should be handled by a subclass method. To void extra memory operations, arrays are returned as pointers. The memory management is handled by the equilibrium subclass instance. If the equilibrium has no external currents return a null() pointer or don't override this method. MAKEGRID has a mode where currents maybe scaled. Inform the signal using this to scale the currents if need be.
[in] | this | A equilibrium_class instance. |
[in] | num_currents | Forces the number of currents to return if greater than zero. |
[out] | scale_currents | Informs the caller that currents need to be scaled. |
real (rprec) function equilibrium::equilibrium_get_gp_ne_ij | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j | ||
) |
Get the electron density gp kernel value for the two indicies.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
integer function equilibrium::equilibrium_get_gp_ne_num_hyper_param | ( | class (equilibrium_class), intent(in) | this | ) |
Get the number of electron density gp kernel hyper parameters.
This method is virtual. The actual getting of the number of hyper parameters should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_gp_ne_pi | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
[in] | i | Profile position index. |
real (rprec) function equilibrium::equilibrium_get_gp_ne_pp | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
real (rprec) function equilibrium::equilibrium_get_gp_sxrem_ij | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(in) | index | ||
) |
Get the electron density gp kernel value for the two indicies.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | i | ith profile position. |
[in] | j | ith profile position. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
integer function equilibrium::equilibrium_get_gp_sxrem_num_hyper_param | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Get the number of soft x-ray emissivity gp kernel hyper parameters.
This method is virtual. The actual getting of the number of hyper parameters should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
real (rprec) function equilibrium::equilibrium_get_gp_sxrem_pi | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the soft x-ray emissivity at. |
[in] | i | Profile position index. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
real (rprec) function equilibrium::equilibrium_get_gp_sxrem_pp | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
[in] | y_cart | Profile position index. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
real (rprec) function equilibrium::equilibrium_get_gp_te_ij | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j | ||
) |
Get the electron temperature gp kernel value for the two indicies.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | i | ith profile position. |
[in] | j | ith profile position. |
integer function equilibrium::equilibrium_get_gp_te_num_hyper_param | ( | class (equilibrium_class), intent(in) | this | ) |
Get the number of electron temperature gp kernel hyper parameters.
This method is virtual. The actual getting of the number of hyper parameters should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_gp_te_pi | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
[in] | i | Profile position index. |
real (rprec) function equilibrium::equilibrium_get_gp_te_pp | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
real (rprec) function equilibrium::equilibrium_get_gp_ti_ij | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j | ||
) |
Get the ion temperature gp kernel value for the two indicies.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | i | ith profile position. |
[in] | j | ith profile position. |
integer function equilibrium::equilibrium_get_gp_ti_num_hyper_param | ( | class (equilibrium_class), intent(in) | this | ) |
Get the number of ion temperature gp kernel hyper parameters.
This method is virtual. The actual getting of the number of hyper parameters should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_gp_ti_pi | ( | class (equilibrium_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.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the ion temperature at. |
[in] | i | Profile position index. |
real (rprec) function equilibrium::equilibrium_get_gp_ti_pp | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
real (rprec), dimension(3), intent(in) | y_cart | ||
) |
Get the ion temperature gp kernel value for the position and position.
This method is virtual. The actual getting of the kernel function should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the kernel at. |
[in] | y_cart | Cartesian position to get the kernel at. |
integer function equilibrium::equilibrium_get_grid_size | ( | class (equilibrium_class), intent(in) | this | ) |
Get radial grid size.
This method is virtual. The actual getting of the radial grid size should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_grid_start | ( | class (equilibrium_class), intent(in) | this | ) |
Get start of the radial grid.
This method is virtual. The actual getting of the radial grid start should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_grid_stop | ( | class (equilibrium_class), intent(in) | this | ) |
Get stop of the radial grid.
This method is virtual. The actual getting of the radial grid stop should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_int_b_dphi | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | s, | ||
real (rprec), intent(in) | theta | ||
) |
Gets the loop integrated magnetic field at a position.
This method is virtual. The actual getting of the loop integrated magnetic field should be handled by a subclass method. Returns the closed loop integration of the magnetic field to determine the enclosed current.
[in] | this | A equilibrium_class instance. |
[in] | s | Radial position to integrate about. |
[in] | theta | Poloidal angle to integrate about. |
real (rprec) function, dimension(:,:,:), pointer equilibrium::equilibrium_get_magnetic_volume_jphigrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get volume magnetic volume integration jphi grid points.
This method is virtual. The actual getting of the jphi grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:,:,:), pointer equilibrium::equilibrium_get_magnetic_volume_jrgrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get volume magnetic volume integration jr grid points.
This method is virtual. The actual getting of the jr grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:,:,:), pointer equilibrium::equilibrium_get_magnetic_volume_jzgrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get volume magnetic volume integration jz grid points.
This method is virtual. The actual getting of the jz grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:,:,:), pointer equilibrium::equilibrium_get_magnetic_volume_rgrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get volume magnetic volume integration radial grid points.
This method is virtual. The actual getting of the radial grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:,:,:), pointer equilibrium::equilibrium_get_magnetic_volume_zgrid | ( | class (equilibrium_class), intent(in) | this | ) |
Get volume magnetic volume integration z grid points.
This method is virtual. The actual getting of the z grid points should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function, dimension(:), pointer equilibrium::equilibrium_get_ne_af | ( | class (equilibrium_class), intent(in) | this | ) |
Get the electron density profile af array.
This method is virtual. The actual getting of the af array should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_ne_cart | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Gets the electron density at a cartesian position.
This method is virtual. The actual getting of the electron density should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
real (rprec) function equilibrium::equilibrium_get_ne_radial | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | s | ||
) |
Gets the electron density at a radial position.
This method is virtual. The actual getting of the electron density should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | s | Radial position to get the electron density at. |
real (rprec) function equilibrium::equilibrium_get_p_cart | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart, | ||
logical, intent(in) | normalize | ||
) |
Gets the plasma pressure at a cartesian position.
This method is virtual. The actual getting of the plasma pressure should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the plasma pressure at. |
[in] | normalize | Normalize the pressure value. |
real (rprec) function equilibrium::equilibrium_get_p_radial | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | s, | ||
logical, intent(in) | normalize | ||
) |
Gets the plasma pressure at a radial position.
This method is virtual. The actual getting of the plasma pressure should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | s | Cartesian position to get the plasma pressure at. |
[in] | normalize | Normalize the pressure value. |
integer function equilibrium::equilibrium_get_param_id | ( | class (equilibrium_class), intent(in) | this, |
character (len=*), intent(in) | param_name | ||
) |
Get the id for a reconstruction parameter.
This method is virtual. The actual getting of the reconstruction parameter id should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | param_name | Name of a reconstruction parameter. |
character(len=data_name_length) function equilibrium::equilibrium_get_param_name | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Gets the name of a reconstruction equilibrium parameter.
This method is virtual. The actual getting of the reconstruction parameter name should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | id | ID of the parameter. |
real (rprec) function equilibrium::equilibrium_get_param_value | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | id, | ||
integer, intent(in) | i_index, | ||
integer, intent(in) | j_index | ||
) |
Gets the value of a reconstruction equilibrium parameter.
This method is virtual. The actual getting of the reconstruction parameter value should be handled by a subclass method.
[in] | this | A equilibrium_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. |
integer function equilibrium::equilibrium_get_plasma_edge | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | phi, | ||
real (rprec), dimension(:), pointer | r, | ||
real (rprec), dimension(:), pointer | z | ||
) |
Gets the r and z positions of the outer surface at a toroidal angle.
This method is virtual. The actual getting of the magnetic field vector should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | phi | Toroidal angle to determine the outer surface at. |
[out] | r | The radial postions of the other surface in a single toroidal angle. |
[out] | z | The Z postions of the other surface in a single toroidal angle. |
real (rprec) function, dimension(:), pointer equilibrium::equilibrium_get_sxrem_af | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Get the soft x-ray emissivity profile af array.
This method is virtual. The actual getting of the af array should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
real (rprec) function equilibrium::equilibrium_get_sxrem_cart | ( | class (equilibrium_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.
This method is virtual. The actual getting of the soft x-ray emissivity should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the soft x-ray emissivity at. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
real (rprec) function equilibrium::equilibrium_get_sxrem_radial | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | s, | ||
integer, intent(in) | index | ||
) |
Gets the soft x-ray emissivity at a radial position.
This method is virtual. The actual getting of the soft x-ray emissivity should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | s | Cartesian position to get the soft x-ray emissivity at. |
[in] | index | Index of the soft x-ray emissivity profile to use. |
real (rprec) function, dimension(:), pointer equilibrium::equilibrium_get_te_af | ( | class (equilibrium_class), intent(in) | this | ) |
Get the electron temperature profile af array.
This method is virtual. The actual getting of the af array should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_te_cart | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Gets the electron temperature at a cartesian position.
This method is virtual. The actual getting of the electron temperature should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
real (rprec) function equilibrium::equilibrium_get_te_radial | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | s | ||
) |
Gets the electron temperature at a radial position.
This method is virtual. The actual getting of the electron temperature should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | s | Cartesian position to get the electron temperature at. |
real (rprec) function, dimension(:), pointer equilibrium::equilibrium_get_ti_af | ( | class (equilibrium_class), intent(in) | this | ) |
Get the ion temperature profile af array.
This method is virtual. The actual getting of the af array should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
real (rprec) function equilibrium::equilibrium_get_ti_cart | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Gets the ion temperature at a cartesian position.
This method is virtual. The actual getting of the electron temperature should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
real (rprec) function equilibrium::equilibrium_get_ti_radial | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), intent(in) | s | ||
) |
Gets the ion temperature at a radial position.
This method is virtual. The actual getting of the ion temperature should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | r | Cartesian position to get the ion temperature at. |
recursive character (len=data_name_length) function equilibrium::equilibrium_get_type | ( | class (equilibrium_class), intent(in) | this | ) |
Checks if a parameter id is a reconstruction parameter.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A signal_class instance. |
real (rprec) function equilibrium::equilibrium_get_volume_int_element | ( | class (equilibrium_class), intent(in) | this | ) |
Get volume integration element.
This method is virtual. The actual getting of the volume integration element should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
logical function equilibrium::equilibrium_has_vacuum_field | ( | class (equilibrium_class), intent(in) | this | ) |
Determines if vacuum field information is available.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
logical function equilibrium::equilibrium_is_2d_array | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Checks if a parameter id is a 2d array.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | id | ID of the parameter. |
logical function equilibrium::equilibrium_is_in_plasma | ( | class (equilibrium_class), intent(in) | this, |
real (rprec), dimension(3), intent(in) | x_cart | ||
) |
Determines if a point is inside the plasma or outside.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A model_class instance. |
[in] | x_cart | Cartesian position to check. |
logical function equilibrium::equilibrium_is_recon_param | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Checks if a parameter id is a reconstruction parameter.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | id | ID of the parameter. |
logical function equilibrium::equilibrium_is_scaler_value | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Checks if a parameter id is a scaler value.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | id | ID of the parameter. |
logical function equilibrium::equilibrium_is_using_point | ( | class (equilibrium_class), intent(in) | this | ) |
Checks if the point magnetics are being used.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
type (vertex) function, pointer equilibrium::equilibrium_limit_path_to_boundary | ( | class (equilibrium_class), intent(in) | this, |
type (vertex), pointer | path | ||
) |
Limit an integration path to the boundary.
This method is virtual. The actual check should be handled by a subclass method.
[in] | this | A model_class instance. |
[in] | path | A chord path. |
subroutine equilibrium::equilibrium_read_vac_file | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | index, | ||
integer, intent(in) | eq_comm | ||
) |
Loads the vacuum magnetic field file.
Loads the vacuum magnetic field file. This will get on multiple processes to allow parallel loading of vacuum files.
[in] | this | A equilibrium_class instance. |
[in] | index | Index of the changed current. |
[in] | eq_comm | MPI communicator pool for VMEC. |
subroutine equilibrium::equilibrium_reset_state | ( | class (equilibrium_class), intent(inout) | this | ) |
Reset the internal state of the equilibrium.
This method is virtual. The actual reseting of the equilibrium state should be handled by a subclass method. Sub classes need to make sure that the equilibrium is reset to a converged state.
[in,out] | this | A equilibrium_class instance. |
subroutine equilibrium::equilibrium_restart | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step | ||
) |
Restart equilibrium.
This method is virtual. The actual restarting of the equilibrium variables should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | current_step | Step index to write variables to. |
subroutine equilibrium::equilibrium_save_state | ( | class (equilibrium_class), intent(inout) | this | ) |
Save the internal state of the equilibrium.
This method is virtual. The actual saving of the equilibrium state should be handled by a subclass method.
[in,out] | this | A equilibrium_class instance. |
subroutine equilibrium::equilibrium_set_magnetic_cache_point | ( | class (equilibrium_class), intent(inout) | this, |
logical, intent(in) | use_axi, | ||
integer, intent(in) | state_flags | ||
) |
Sets the magnetic cache of the equilibrium for points.
This method is virtual. The actual setting of the magnetic cache should be handled a subclass method. The magnetic cache is any pre compuation that needs to be performed so that magnetic signals may compute a modeled signal. If the equilibrium does not require any information to be cached, this method does not need to be overridden. This method is meant to only be called once to tell the equilibrium it needs to use a magnetic cache.
[in,out] | this | A equilibrium_class instance. |
[in] | use_axi | Magnetics can subtract off axisymmetric components. |
[in] | state_flags | Bitwise flags to indicate which parts of the model changed. |
subroutine equilibrium::equilibrium_set_magnetic_cache_response | ( | class (equilibrium_class), intent(inout) | this, |
type (magnetic_response_class), intent(in) | response_object, | ||
integer, intent(in) | state_flags | ||
) |
Sets the magnetic cache of the equilibrium for the magnetic response.
This method is virtual. The actual setting of the magnetic cache should be handled a subclass method. The magnetic cache is any pre compuation that needs to be performed so that magnetic signals may compute a modeled signal. If the equilibrium does not require any information to be cached, this method does not need to be overridden. This method is meant to only be called once to tell the equilibrium it needs to use a magnetic cache.
[in,out] | this | A equilibrium_class instance. |
[in] | response_object | A magnetic_response::magnetic_response_class instance. |
[in] | state_flags | Bitwise flags to indicate which parts of the model changed. |
subroutine equilibrium::equilibrium_set_param | ( | class (equilibrium_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, | ||
integer, intent(inout) | state_flags | ||
) |
Sets the value of a reconstruction equilibrium parameter.
This method is virtual. The actual setting of the parameter should be handled by a subclass method. The subclass is responsible updating the state flags.
[in,out] | this | A equilibrium_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. |
[in,out] | state_flags | Bitwise flags to indicate which parts of the model changed. |
subroutine equilibrium::equilibrium_sync_child | ( | class (equilibrium_class), intent(inout) | this, |
integer, intent(in) | index, | ||
integer, intent(in) | recon_comm | ||
) |
Syncronize a child equilibrium 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 equilibrium_class instance. |
[in] | index | Reconstruction rank to sync. |
[in] | recon_comm | MPI communicator for the reconstruction processes. |
subroutine equilibrium::equilibrium_sync_state | ( | class (equilibrium_class), intent(inout) | this, |
integer, intent(in) | recon_comm | ||
) |
Syncronize the equilibrium 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 equilibrium_class instance. |
[in] | recon_comm | MPI communicator for the reconstruction processes. |
subroutine equilibrium::equilibrium_write | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | iou | ||
) |
Write out the equilibrium to an output file.
This method is virtual. The actual writing of the equilibrium should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | iou | Input/output unit of the output file. |
subroutine equilibrium::equilibrium_write_init_data | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | result_ncid | ||
) |
Write inital data to NetCDF result file.
This method is virtual. The actual writing of the equilibrium variables should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
subroutine equilibrium::equilibrium_write_input | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | current_step | ||
) |
Write out the equilibrium to an output file.
This method is virtual. The actual writing of the equilibrium should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | current_step | Step number to append to input filename. |
subroutine equilibrium::equilibrium_write_step_data | ( | class (equilibrium_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step | ||
) |
Write step data to NetCDF result file.
This method is virtual. The actual writing of the equilibrium variables should be handled by a subclass method.
[in] | this | A equilibrium_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | current_step | Step index to write variables to. |