Stellarator-Tools
All Classes Namespaces Files Functions Variables Typedefs Enumerations Macros Pages
siesta_equilibrium::siesta_class Interface Reference

Base class representing a siesta_equilibrium. More...

Inheritance diagram for siesta_equilibrium::siesta_class:
vmec_equilibrium::vmec_class equilibrium::equilibrium_class

Public Member Functions

procedure set_param (this, id, i_index, j_index, value, eq_comm, state_flags)
 Sets the value of a reconstruction equilibrium parameter.
 
procedure set_magnetic_cache_response (this, response_object, state_flags)
 Set magnetic cache for plasma response.
 
procedure set_magnetic_cache_point (this, use_axi, state_flags)
 Set magnetic cache initialy.
 
procedure set_magnetic_cache_calc (this)
 Set magnetic cache.
 
procedure get_type (this)
 Gets a discription of the equilibrium type.
 
procedure get_param_id (this, param_name)
 Get the id for a reconstruction parameter.
 
procedure get_param_value (this, id, i_index, j_index)
 Get the value of a reconstruction siesta parameter.
 
procedure get_param_name (this, id)
 Get the name of a reconstruction siesta parameter.
 
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.
 
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 s, u=0, v=0 position.
 
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.
 
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 s, u=0, v=0 position.
 
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 ion temperature gp kernel value for the position and position.
 
procedure get_ti_cart (this, x_cart)
 Gets the ion temperature at a cartesian position.
 
procedure get_ti_radial (this, s)
 Gets the ion temperature at a s, u=0, v=0 position.
 
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.
 
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 s, u=0, v=0 position.
 
procedure get_p_cart (this, x_cart, normalize)
 Gets the plasma pressure at a cartesian position.
 
procedure get_p_radial (this, s, normalize)
 Gets the plasma pressure at a s, u=0, v=0 position.
 
procedure get_p_flux (this, flux, normalize)
 Gets the plasma pressure at a flux position.
 
procedure get_b_vec (this, x_cart, cyl)
 Gets the magnetic field vector at a position.
 
procedure get_int_b_dphi (this, s, theta)
 Gets the loop integrated magnetic field at a position.
 
procedure get_suv (this, x_cart)
 Gets siesta s value at position.
 
procedure get_plasma_edge (this, phi, r, z)
 Gets the r and z positions of the outer surface at a toroidal angle.
 
procedure get_ext_b_plasma (this, position, axi_only)
 Get external plasma magnetic field.
 
procedure get_int_b_plasma (this, flux)
 Get internal plasma magnetic field.
 
procedure get_grid_size (this)
 Get radial grid size.
 
procedure is_1d_array (this, id)
 Checks if a parameter id is a 1d array.
 
procedure is_recon_param (this, id)
 Checks if a parameter id is a reconstruction parameter.
 
procedure converge (this, num_iter, iou, eq_comm, state_flags)
 Solves the siesta equilibrium.
 
procedure save_state (this)
 Save the internal state of the equilibrium.
 
procedure reset_state (this)
 Reset the internal state of the equilibrium.
 
procedure write (this, iou)
 Write out the equilibrium to an output file.
 
procedure write_input (this, current_step)
 Write the current valid input.
 
procedure sync_state (this, recon_comm)
 Syncronize the siesta state to children.
 
procedure sync_child (this, index, recon_comm)
 Syncronize a child siesta state to the parent.
 
FINAL siesta_destruct (this)
 Deconstruct a siesta_class object.
 
type(siesta_class) function, pointer siesta_construct (file_name, restart_file_name, ne, te, ti, sxrem, phi_offset, z_offset, pol_rad_ratio, iou, eq_comm, recon_comm, state_flags, vmec_namelist, wout_file_name, force_solve)
 Construct a siesta_class object.
 
- Public Member Functions inherited from vmec_equilibrium::vmec_class
procedure set_param (this, id, i_index, j_index, value, eq_comm, state_flags)
 Sets the value of a reconstruction equilibrium parameter.
 
procedure set_magnetic_cache_response (this, response_object, state_flags)
 Set magnetic cache for plasma resonce.
 
procedure set_magnetic_cache_point (this, use_axi, state_flags)
 Set magnetic cache initialy.
 
procedure set_magnetic_cache_calc (this)
 Set magnetic cache initialy.
 
procedure set_namelist (this)
 Sets namelist variables from the solved VMEC equilibrium.
 
procedure get_type (this)
 Gets a discription of the equilibrium type.
 
procedure get_param_id (this, param_name)
 Get the id for a reconstruction parameter.
 
procedure get_param_value (this, id, i_index, j_index)
 Get the value of a reconstruction VMEC parameter.
 
procedure get_param_name (this, id)
 Get the name of a reconstruction VMEC parameter.
 
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_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.
 
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 s position.
 
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_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.
 
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 s position.
 
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_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 ion temperature gp kernel value for the position and position.
 
procedure get_ti_cart (this, x_cart)
 Gets the ion temperature at a cartesian position.
 
procedure get_ti_radial (this, s)
 Gets the ion temperature at a s position.
 
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_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.
 
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 s position.
 
procedure get_p_cart (this, x_cart, normalize)
 Gets the plasma pressure at a cartesian position.
 
procedure get_p_radial (this, s, normalize)
 Gets the plasma pressure at a s position.
 
procedure get_b_vec (this, x_cart, cyl)
 Gets the magnetic field vector at a position.
 
procedure get_int_b_dphi (this, s, theta)
 Gets the loop integrated magnetic field at a position.
 
procedure get_suv (this, x_cart)
 Gets VMEC suv position.
 
procedure get_s (this, x_cart)
 Gets VMEC s value at position.
 
procedure get_flux (this, x_cart)
 Gets VMEC normalized flux value at position.
 
procedure get_plasma_edge (this, phi, r, z)
 Gets the r and z positions of the outer surface at a toroidal angle.
 
procedure get_magnetic_volume_rgrid (this)
 Get volume magnetic volume integration radial grid points.
 
procedure get_magnetic_volume_zgrid (this)
 Get volume magnetic volume integration z grid points.
 
procedure get_magnetic_volume_jrgrid (this)
 Get volume magnetic volume integration jr grid points.
 
procedure get_magnetic_volume_jphigrid (this)
 Get volume magnetic volume integration jphi grid points.
 
procedure get_magnetic_volume_jzgrid (this)
 Get volume magnetic volume integration jz grid points.
 
procedure get_volume_int_element (this)
 Get volume integration element.
 
procedure get_con_surface_krgrid (this)
 Get the conducting surface integration kr grid points.
 
procedure get_con_surface_kphigrid (this)
 Get the conducting surface integration kphi grid points.
 
procedure get_con_surface_kzgrid (this)
 Get the conducting surface integration kz grid points.
 
procedure get_area_int_element (this)
 Get area integration element.
 
procedure get_ext_currents (this, num_currents, scale_currents)
 Get external current.
 
procedure get_b_vac (this, r_cyl)
 Gets the vacuum magnetic field vector at a position.
 
procedure get_ext_b_plasma (this, position, axi_only)
 Get external plasma magnetic field.
 
procedure get_grid_size (this)
 Get radial grid size.
 
procedure get_grid_start (this)
 Get start of the radial grid.
 
procedure get_grid_stop (this)
 Get radial grid size.
 
procedure is_scaler_value (this, id)
 Checks if a parameter id is a scaler value.
 
procedure is_1d_array (this, id)
 Checks if a parameter id is a 1d array.
 
procedure is_2d_array (this, id)
 Checks if a parameter id is a 2d array.
 
procedure is_recon_param (this, id)
 Checks if a parameter id is a reconstruction parameter.
 
procedure is_using_point (this)
 Checks if the point magnetics are being used.
 
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 gradient_descent (this, t, u, dx, x0)
 Gradient descent to minize the vmec_equilibrium::vmec_limit_chi.
 
procedure converge (this, num_iter, iou, eq_comm, state_flags)
 Solves the VMEC equilibrium.
 
procedure read_vac_file (this, index, eq_comm)
 Loads the vacuum magnetic field file.
 
procedure save_state (this)
 Save the internal state of the equilibrium.
 
procedure reset_state (this)
 Reset the internal state of the equilibrium.
 
procedure write (this, iou)
 Write out the equilibrium to an output file.
 
procedure write_input (this, current_step)
 Write the current valid input.
 
procedure def_result (this, result_ncid, maxnsetps_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 vmec from the result file.
 
procedure sync_state (this, recon_comm)
 Syncronize the vmec state to children.
 
procedure sync_child (this, index, recon_comm)
 Syncronize a child vmec state to the parent.
 
FINAL vmec_destruct (this)
 Deconstruct a vmec_class object.
 
type(vmec_class) function, pointer vmec_construct (file_name, wout_file_name, ne, te, ti, sxrem, phi_offset, z_offset, pol_rad_ratio, iou, eq_comm, recon_comm, state_flags, force_solve)
 Construct a vmec_class object.
 
- Public Member Functions inherited from equilibrium::equilibrium_class
procedure set_param (this, id, i_index, j_index, value, eq_comm, state_flags)
 Sets the value of a reconstruction equilibrium parameter.
 
procedure set_magnetic_cache_response (this, response_object, state_flags)
 Sets the magnetic cache of the equilibrium for the magnetic response.
 
procedure set_magnetic_cache_point (this, use_axi, state_flags)
 Sets the magnetic cache of the equilibrium for points.
 
GENERIC set_magnetic_cache set_magnetic_cache_response, set_magnetic_cache_point
 
procedure get_type (this)
 Checks if a parameter id is a reconstruction parameter.
 
procedure get_param_id (this, param_name)
 Get the id for a reconstruction parameter.
 
procedure get_param_name (this, id)
 Gets the name of a reconstruction equilibrium parameter.
 
procedure get_param_value (this, id, i_index, j_index)
 Gets the value of a reconstruction equilibrium parameter.
 
procedure get_gp_ne_num_hyper_param (this)
 Get the number of electron density gp kernel hyper parameters.
 
procedure get_ne_af (this)
 Get the electron density profile af array.
 
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_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_te_num_hyper_param (this)
 Get the number of electron temperature gp kernel hyper parameters.
 
procedure get_te_af (this)
 Get the electron temperature profile af array.
 
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_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_ti_num_hyper_param (this)
 Get the number of ion temperature gp kernel hyper parameters.
 
procedure get_ti_af (this)
 Get the ion temperature profile af array.
 
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 ion 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_ti_cart (this, x_cart)
 Gets the ion 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_sxrem_num_hyper_param (this, index)
 Get the number of soft x-ray emissivity gp kernel hyper parameters.
 
procedure get_sxrem_af (this, index)
 Get the soft x-ray emissivity profile af array.
 
procedure get_gp_sxrem_ij (this, i, j, index)
 Get the electron density 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_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_p_cart (this, x_cart, normalize)
 Gets the plasma pressure at a cartesian position.
 
procedure get_p_radial (this, s, normalize)
 Gets the plasma pressure at a radial position.
 
GENERIC get_p get_p_cart, get_p_radial
 
procedure get_b_vec (this, x_cart, cyl)
 Gets the magnetic field vector at a position.
 
procedure get_int_b_dphi (this, s, theta)
 Gets the loop integrated magnetic field at a position.
 
procedure get_plasma_edge (this, phi, r, z)
 Gets the r and z positions of the outer surface at a toroidal angle.
 
procedure get_magnetic_volume_rgrid (this)
 Get volume magnetic volume integration radial grid points.
 
procedure get_magnetic_volume_zgrid (this)
 Get volume magnetic volume integration z grid points.
 
procedure get_magnetic_volume_jrgrid (this)
 Get volume magnetic volume integration jr grid points.
 
procedure get_magnetic_volume_jphigrid (this)
 Get volume magnetic volume integration jphi grid points.
 
procedure get_magnetic_volume_jzgrid (this)
 Get volume magnetic volume integration jz grid points.
 
procedure get_volume_int_element (this)
 Get volume integration element.
 
procedure get_con_surface_krgrid (this)
 Get the conducting surface integration kr grid points.
 
procedure get_con_surface_kphigrid (this)
 Get the conducting surface integration kphi grid points.
 
procedure get_con_surface_kzgrid (this)
 Get the conducting surface integration kz grid points.
 
procedure get_area_int_element (this)
 Get area integration element.
 
procedure get_ext_currents (this, num_currents, scale_currents)
 Get external current.
 
procedure get_ext_b_plasma (this, position, axi_only)
 Get external plasma magnetic field.
 
procedure get_grid_size (this)
 Get radial grid size.
 
procedure get_grid_start (this)
 Get start of the radial grid.
 
procedure get_grid_stop (this)
 Get stop of the radial grid.
 
procedure is_scaler_value (this, id)
 Checks if a parameter id is a scaler value.
 
procedure is_2d_array (this, id)
 Checks if a parameter id is a 2d array.
 
procedure is_recon_param (this, id)
 Checks if a parameter id is a reconstruction parameter.
 
procedure is_using_point (this)
 Checks if the point magnetics are being used.
 
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 converge (this, num_iter, iou, eq_comm, state_flags)
 Solves the equilibrium.
 
procedure read_vac_file (this, index, eq_comm)
 Loads the vacuum magnetic field file.
 
procedure save_state (this)
 Save the internal state of the equilibrium.
 
procedure reset_state (this)
 Reset the internal state of the equilibrium.
 
procedure write (this, iou)
 Write out the equilibrium to an output file.
 
procedure write_input (this, current_step)
 Write out the equilibrium to an output file.
 
procedure def_result (this, result_ncid, maxnsetps_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 equilibrium.
 
procedure sync_state (this, recon_comm)
 Syncronize the equilibrium state to children.
 
procedure sync_child (this, index, recon_comm)
 Syncronize a child equilibrium state to the parent.
 
FINAL equilibrium_destruct (this)
 Deconstruct a equilibrium_class object.
 

Public Attributes

character(len=path_length) restart_file_name
 File name of the output of siesta.
 
character(len=path_length) siesta_file_name
 File name of the siesta namelist inout file.
 
class(siesta_run_class), pointer run_context => null()
 Siesta run context.
 
class(siesta_context_class), pointer context => null()
 Siesta context.
 
- Public Attributes inherited from vmec_equilibrium::vmec_class
character(len=path_length) wout_file_name
 File name of the output of vmec.
 
character(len=path_length) vmec_file_name
 File name of the vmec namelist inout file.
 
type(pprofile_class), pointer ne => null()
 pprofile_T describing a flux surface constant electron denisty profile.
 
type(pprofile_class), pointer te => null()
 pprofile_T describing a flux surface constant electron temperature profile.
 
type(pprofile_class), pointer ti => null()
 pprofile_T describing a flux surface constant ion temperature profile.
 
type(pprofile_pointer), dimension(:), pointer sxrem => null()
 pprofile_T describing a flux surface conatsnt soft x-ray emissivity profile.
 
real(rprec) pol_rad_ratio
 Ratio of the poloidal grid points to the poloidal grid points.
 
type(vmec_magnetic_cache), pointer magnetic_cache => null()
 Instance of a vmec_magnetic_cache object.
 
class(vmec_context_class), pointer vmec_context_save => null()
 VMEC context.
 
real(rprec) phi_offset = 0
 Plasma phi offset.
 
real(rprec) z_offset = 0
 Plasma z offset.
 
integer ns_index
 Index of the largest ns value.
 
- Public Attributes inherited from equilibrium::equilibrium_class
logical force_solve
 Controls if an equilibrium is forced to be resolved or not.
 

Detailed Description

Base class representing a siesta_equilibrium.

Interface for siesta constructor.

Super Class:
equilibrium

Member Function/Subroutine Documentation

◆ converge()

procedure siesta_equilibrium::siesta_class::converge ( class (siesta_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 siesta equilibrium.

This method overrides equilibrium::equilibrium_converge. Solves the SIESTA equilibrium and loads the resulting wout file in preparation of computing modeled signals. If the vmec equilibrium needs updating, it solves that in addition.

Parameters
[in,out]thisA siesta_class instance.
[in,out]num_iterCounter to track the number of iterations.
[in]iouInput/Output unit of the runlog file.
[in]eq_commMPI communicator pool for siesta/vmec.
[in]state_flagsBitwise flags to indicate which parts of the model changed.
Returns
True if the convergece was sucessful and false otherwise.

◆ get_b_vec()

procedure siesta_equilibrium::siesta_class::get_b_vec ( class (siesta_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 overrides equilibrium::equilibrium_get_B_vec.

Parameters
[in]thisA siesta_class instance.
[in]x_cartCartesian position to get the magnetic field vector at.
[in]cylFlag that specifies if the bfield should be returned in cartesian or cylindical coordinates.
Returns
The magnetic field vector at x_cart.

◆ get_ext_b_plasma()

procedure siesta_equilibrium::siesta_class::get_ext_b_plasma ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  position,
logical, intent(in)  axi_only 
)

Get external plasma magnetic field.

This method overrides equilibrium::equilibrium_get_ext_b_plasma. The b field is returned in cyclindical coordinates. This function does not require shifting the plasma relative to the diagnostics. The plasma has already been shifted when computing the surface currents and prime position.

Parameters
[in]thisA siesta_class instance.
[in]positionPosition to compute the fields at in cylindrical coordinates.
[in]axi_onlyGives only the axisymmtric component of the magnetic field.
Returns
The external field contributed by the plasma.

◆ get_gp_ne_pi()

procedure siesta_equilibrium::siesta_class::get_gp_ne_pi ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_ne_pi. If no density profile was created zero is returned.

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

◆ get_gp_ne_pp()

procedure siesta_equilibrium::siesta_class::get_gp_ne_pp ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_ne_pp. If no density profile was created zero is returned.

Parameters
[in]thisA siesta_class instance.
[in]x_cartFirst cartesian position to get the electron density at.
[in]y_cartSecond cartesian position to get the electron density at.
Returns
The value of the gp kernel function for x_cart and y_cart.

◆ get_gp_sxrem_pi()

procedure siesta_equilibrium::siesta_class::get_gp_sxrem_pi ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_sxrem_pi. If no density profile was created zero is returned.

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

◆ get_gp_sxrem_pp()

procedure siesta_equilibrium::siesta_class::get_gp_sxrem_pp ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_sxrem_pp. If no soft x-ray emissivity profile was created zero is returned.

Parameters
[in]thisA siesta_class instance.
[in]x_cartFirst cartesian position to get the soft x-ray emissivity at.
[in]y_cartSecond cartesian position to get the soft x-ray emissivity at.
[in]indexIndex of the soft x-ray emissivity profile.
Returns
The value of the gp kernel function for x_cart and y_cart.

◆ get_gp_te_pi()

procedure siesta_equilibrium::siesta_class::get_gp_te_pi ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_te_pi. If no electron temperature profile was created zero is returned.

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

◆ get_gp_te_pp()

procedure siesta_equilibrium::siesta_class::get_gp_te_pp ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_te_pp. If no electron temperature profile was created zero is returned.

Parameters
[in]thisA siesta_class instance.
[in]x_cartFirst cartesian position to get the electron temperature at.
[in]y_cartSecond cartesian position to get the electron temperature at.
Returns
The value of the gp kernel function for x_cart and y_cart.

◆ get_gp_ti_pi()

procedure siesta_equilibrium::siesta_class::get_gp_ti_pi ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_ti_pi. If no ion temperature profile was created zero is returned.

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

◆ get_gp_ti_pp()

procedure siesta_equilibrium::siesta_class::get_gp_ti_pp ( class (siesta_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 overrides equilibrium::equilibrium_get_gp_ti_pp. If no ion temperature profile was created zero is returned.

Parameters
[in]thisA siesta_class instance.
[in]x_cartFirst cartesian position to get the ion temperature at.
[in]y_cartSecond cartesian position to get the ion temperature at.
Returns
The value of the gp kernel function for x_cart and y_cart.

◆ get_grid_size()

procedure siesta_equilibrium::siesta_class::get_grid_size ( class (siesta_class), intent(in)  this)

Get radial grid size.

This method overrides equilibrium::equilibrium_get_grid_size.

Parameters
[in]thisA siesta_class instance.
Returns
Size of the radial grid.

◆ get_int_b_dphi()

procedure siesta_equilibrium::siesta_class::get_int_b_dphi ( class (siesta_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 overrides equilibrium::equilibrium_get_Int_B_dphi. This computes Int[B*dl]

Parameters
[in]thisA siesta_class instance.
[in]sS position to integrate about.
[in]thetaU angle to integrate about.
Returns
The loop integrated magnetic field at x_cart.

◆ get_int_b_plasma()

procedure siesta_equilibrium::siesta_class::get_int_b_plasma ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  flux 
)

Get internal plasma magnetic field.

The internal b field is returned in cyclindical coordinates. This function does not require shifting the plasma relative to the diagnostics. The plasma has already been shifted when converting to the flux surface position.

Parameters
[in]thisA siesta_class instance.
[in]fluxPosition to compute the fields at in cylindrical coordinates.
Returns
The internal field.

◆ get_ne_cart()

procedure siesta_equilibrium::siesta_class::get_ne_cart ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart 
)

Gets the electron density at a cartesian position.

This method overrides equilibrium::equilibrium_get_ne. If no density profile was created, return zero. Density is defined by a mapping function of the pressure.

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

◆ get_ne_radial()

procedure siesta_equilibrium::siesta_class::get_ne_radial ( class (siesta_class), intent(in)  this,
real (rprec), intent(in)  s 
)

Gets the electron density at a s, u=0, v=0 position.

This method overrides equilibrium::equilibrium_get_ne. If no density profile was created, return zero. Density is defined by a mapping function of the pressure.

Parameters
[in]thisA siesta_class instance.
[in]sRadial position to get the electron density at.
Returns
The electron density at s, u=0, v=0.

◆ get_p_cart()

procedure siesta_equilibrium::siesta_class::get_p_cart ( class (siesta_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 overrides equilibrium::equilibrium_get_p.

Parameters
[in]thisA siesta_class instance.
[in]x_cartCartesian position to get the plasma pressure at.
[in]normalizeNormalize the pressure value.
Returns
The plasma pressure at x_cart.

◆ get_p_flux()

procedure siesta_equilibrium::siesta_class::get_p_flux ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  flux,
logical, intent(in)  normalize 
)

Gets the plasma pressure at a flux position.

This method overrides equilibrium::equilibrium_get_p.

Parameters
[in]thisA siesta_class instance.
[in]sRadial position to get the electron density at.
[in]normalizeNormalize the pressure value.
Returns
The plasma pressure at flux.

◆ get_p_radial()

procedure siesta_equilibrium::siesta_class::get_p_radial ( class (siesta_class), intent(in)  this,
real (rprec), intent(in)  s,
logical, intent(in)  normalize 
)

Gets the plasma pressure at a s, u=0, v=0 position.

This method overrides equilibrium::equilibrium_get_p.

Parameters
[in]thisA siesta_class instance.
[in]sCartesian position to get the plasma pressure at.
[in]normalizeNormalize the pressure value.
Returns
The plasma pressure at x_cart.

◆ get_param_id()

procedure siesta_equilibrium::siesta_class::get_param_id ( class (siesta_class), intent(in)  this,
character (len=*), intent(in)  param_name 
)

Get the id for a reconstruction parameter.

This method overrides equilibrium::equilibrium_get_param_id.

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

◆ get_param_name()

procedure siesta_equilibrium::siesta_class::get_param_name ( class (siesta_class), intent(in)  this,
integer, intent(in)  id 
)

Get the name of a reconstruction siesta parameter.

This method overrides equilibrium::equilibrium_get_param_name.

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

◆ get_param_value()

procedure siesta_equilibrium::siesta_class::get_param_value ( class (siesta_class), intent(in)  this,
integer, intent(in)  id,
integer, intent(in)  i_index,
integer, intent(in)  j_index 
)

Get the value of a reconstruction siesta parameter.

This method overrides equilibrium::equilibrium_get_param_value.

Parameters
[in]thisA siesta_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.

◆ get_plasma_edge()

procedure siesta_equilibrium::siesta_class::get_plasma_edge ( class (siesta_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 overrides equilibrium::equilibrium_get_plasma_edge.

Todo:
FIXME: The vmec boundary won't be the case for Free boundary siesta.
Parameters
[in]thisA siesta_class instance.
[in]phiToroidal angle to determine the outer surface at.
[in,out]rThe radial postions of the other surface in a single toroidal angle.
[in,out]zThe Z postions of the other surface in a single toroidal angle.
Returns
The number of elements in the r and z arrays.

◆ get_suv()

procedure siesta_equilibrium::siesta_class::get_suv ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart 
)

Gets siesta s value at position.

Converts from cartesian coordinates to siesta's flux coordinates. Unlike vmec where only the s position in flux surface space is needed, the full flux surface space potition is needed here.

Parameters
[in]thisA siesta_class instance.
[in]x_cartCartesian position to get the s position at.
Returns
The suv position at x_cart.

◆ get_sxrem_cart()

procedure siesta_equilibrium::siesta_class::get_sxrem_cart ( class (siesta_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 overrides equilibrium::equilibrium_get_sxrem. If no soft x-ray emissivity profile was created, return zero. Soft x-ray emissivity is defined by a mapping function of the pressure.

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

◆ get_sxrem_radial()

procedure siesta_equilibrium::siesta_class::get_sxrem_radial ( class (siesta_class), intent(in)  this,
real (rprec), intent(in)  s,
integer, intent(in)  index 
)

Gets the soft x-ray emissivity at a s, u=0, v=0 position.

This method overrides equilibrium::equilibrium_get_sxrem. If no soft x-ray emissivity profile was created, return zero. Soft x-ray emissivity is defined by a mapping function of the pressure.

Parameters
[in]thisA siesta_class instance.
[in]sRadial position to get the electron density at.
[in]indexIndex of the soft x-ray emissivity profile.
Returns
The soft x-ray emissivity at s, u=0, v=0.

◆ get_te_cart()

procedure siesta_equilibrium::siesta_class::get_te_cart ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart 
)

Gets the electron temperature at a cartesian position.

This method overrides equilibrium::equilibrium_get_te. If no electron temperature profile was created, return zero. Electron temperature is defined by a mapping function of the pressure.

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

◆ get_te_radial()

procedure siesta_equilibrium::siesta_class::get_te_radial ( class (siesta_class), intent(in)  this,
real (rprec), intent(in)  s 
)

Gets the electron temperature at a s, u=0, v=0 position.

This method overrides equilibrium::equilibrium_get_te. If no electron temperature profile was created, return zero. Electron temperature is defined by a mapping function of the pressure.

Parameters
[in]thisA siesta_class instance.
[in]sRadial position to get the electron density at.
Returns
The electron temperature at s, u=0, v=0.

◆ get_ti_cart()

procedure siesta_equilibrium::siesta_class::get_ti_cart ( class (siesta_class), intent(in)  this,
real (rprec), dimension(3), intent(in)  x_cart 
)

Gets the ion temperature at a cartesian position.

This method overrides equilibrium::equilibrium_get_ti. If no ion temperature profile was created, return zero. Ion temperature is defined by a mapping function of the pressure.

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

◆ get_ti_radial()

procedure siesta_equilibrium::siesta_class::get_ti_radial ( class (siesta_class), intent(in)  this,
real (rprec), intent(in)  s 
)

Gets the ion temperature at a s, u=0, v=0 position.

This method overrides equilibrium::equilibrium_get_ti. If no ion ion temperature profile was created, return zero. Ion temperature is defined by a mapping function of the pressure.

Parameters
[in]thisA siesta_class instance.
[in]sRadial position to get the ion density at.
Returns
The ion temperature at s, u=0, v=0.

◆ get_type()

procedure siesta_equilibrium::siesta_class::get_type ( class (siesta_class), intent(in)  this)

Gets a discription of the equilibrium type.

Parameters
[in]thisA siesta_class instance.
Returns
A string describing the signal type.

◆ is_1d_array()

procedure siesta_equilibrium::siesta_class::is_1d_array ( class (siesta_class), intent(in)  this,
integer, intent(in)  id 
)

Checks if a parameter id is a 1d array.

This method overrides equilibrium::equilibrium_is_1d_array.

Parameters
[in]thisA siesta_class instance.
[in]idID of the parameter.
Returns
True if the parameter is a 1d array and false if otherwise.

◆ is_recon_param()

procedure siesta_equilibrium::siesta_class::is_recon_param ( class (siesta_class), intent(in)  this,
integer, intent(in)  id 
)

Checks if a parameter id is a reconstruction parameter.

This method overrides equilibrium::equilibrium_is_recon_param.

Parameters
[in]thisA siesta_class instance.
[in]idID of the parameter.
Returns
True if the parameter is a reconstruction parameter and false if otherwise.

◆ reset_state()

procedure siesta_equilibrium::siesta_class::reset_state ( class (siesta_class), intent(inout)  this)

Reset the internal state of the equilibrium.

Copies the saved siesta state back to siesta. Also resets the vmec state.

Parameters
[in,out]thisA siesta_class instance.

◆ save_state()

procedure siesta_equilibrium::siesta_class::save_state ( class (siesta_class), intent(inout)  this)

Save the internal state of the equilibrium.

Saves the siesta state. Also saves the vmec state.

Parameters
[in,out]thisA siesta_class instance.

◆ set_magnetic_cache_calc()

procedure siesta_equilibrium::siesta_class::set_magnetic_cache_calc ( class (siesta_class), intent(inout)  this)

Set magnetic cache.

After the equilibrium has been converged calculate the r, z, jr, jphi and jz on grid of s, u, v points.

Parameters
[in,out]thisA siesta_class instance.

◆ set_magnetic_cache_point()

procedure siesta_equilibrium::siesta_class::set_magnetic_cache_point ( class (siesta_class), intent(inout)  this,
logical, intent(in)  use_axi,
integer, intent(in)  state_flags 
)

Set magnetic cache initialy.

This method overrides equilibrium::equilibrium_set_magnetic_cache. This allocates a sieste_magnetic_cache structure. Point measurements require no array allocations.

Parameters
[in,out]thisA siesta_class instance.
[in]use_axiMagnetics can subtract off axisymmetric components.
[in]state_flagsBitwise flags to indicate which parts of the model changed.

◆ set_magnetic_cache_response()

procedure siesta_equilibrium::siesta_class::set_magnetic_cache_response ( class (siesta_class), intent(inout)  this,
type (magnetic_response_class), intent(in)  response_object,
integer, intent(in)  state_flags 
)

Set magnetic cache for plasma response.

This method overrides equilibrium::equilibrium_set_magnetic_cache. This allocates a vmec_magnetic_cache structure. Point measurements require no array allocations.

Parameters
[in,out]thisA siesta_class instance.
[in]response_objectA magnetic_response::magnetic_response_class instance.
[in]state_flagsBitwise flags to indicate which parts of the model changed.

◆ set_param()

procedure siesta_equilibrium::siesta_class::set_param ( class (siesta_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 overrides equilibrium::equilibrium_set_param. When a SIESTA parameter is changed, propagate the changes to the SIESTA internal state and inform the caller that the equilibrium needs reconvergence.

Parameters
[in,out]thisA siesta_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.
[in,out]state_flagsBitwise flags to indicate which parts of the model changed.

◆ siesta_construct()

type (siesta_class) function, pointer siesta_equilibrium::siesta_class::siesta_construct ( character (len=*), intent(in)  file_name,
character (len=*), intent(in)  restart_file_name,
type (pprofile_class), pointer  ne,
type (pprofile_class), pointer  te,
type (pprofile_class), pointer  ti,
type (pprofile_pointer), dimension(:), pointer  sxrem,
real (rprec), intent(in)  phi_offset,
real (rprec), intent(in)  z_offset,
real (rprec), intent(in)  pol_rad_ratio,
integer, intent(in)  iou,
integer, intent(in)  eq_comm,
integer, intent(in)  recon_comm,
integer, intent(inout)  state_flags,
character (len=*), intent(in)  vmec_namelist,
character (len=*), intent(in)  wout_file_name,
logical, intent(in)  force_solve 
)

Construct a siesta_class object.

Allocates memory and initializes a siesta_class object. Currently this is limited to just loading an already created restart file but in the future it will load initalize and load siesta as well.

Parameters
[in]file_nameFilename of the siesta namelist input file.
[in]restart_file_nameFilename of the siesta restart file.
[in]nepprofile_T for the electron density.
[in]tepprofile_T for the electron temperature.
[in]tipprofile_T for the ion temperature.
[in]sxrempprofile_T for the soft x-ray emissivity.
[in]phi_offsetInitial phi offset of the plasma relative to the diagnostics in radians.
[in]z_offsetInitial Z offset of the plasma relative to the machine center.
[in]iouInput/output unit to log messages to.
[in]eq_commMPI communicator pool for SIESTA.
[in]recon_commMPI communicator pool for reconstruction.
[in]vmecAn instance of a vmec_equilibrium object.
[in,out]state_flagsBitwise flags to indicate which parts of the model changed.
[in]vmec_namelistFilename of the vmec namelist input file.
[in]wout_file_nameFilename of the vmec wout input file.
[in]force_solveIf true, forces the equilbirum to resolve every time.
Returns
A pointer to a constructed siesta_class object.

◆ siesta_destruct()

FINAL siesta_equilibrium::siesta_class::siesta_destruct ( type (siesta_class), intent(inout)  this)
final

Deconstruct a siesta_class object.

Deallocates memory and uninitializes a siesta_class object.

Parameters
[in,out]thisA siesta_class instance.

◆ sync_child()

procedure siesta_equilibrium::siesta_class::sync_child ( class (siesta_class), intent(inout)  this,
integer, intent(in)  index,
integer, intent(in)  recon_comm 
)

Syncronize a child siesta 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 siesta_class instance.
[in]indexReconstruction rank to sync.
[in]recon_commMPI communicator for the reconstruction processes.

◆ sync_state()

procedure siesta_equilibrium::siesta_class::sync_state ( class (siesta_class), intent(inout)  this,
integer, intent(in)  recon_comm 
)

Syncronize the siesta 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 siesta_class instance.
[in]recon_commMPI communicator for the reconstruction processes.

◆ write()

procedure siesta_equilibrium::siesta_class::write ( class (siesta_class), intent(in)  this,
integer, intent(in)  iou 
)

Write out the equilibrium to an output file.

This method overrides equilibrium::equilibrium_write.

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

◆ write_input()

procedure siesta_equilibrium::siesta_class::write_input ( class (siesta_class), intent(in)  this,
integer, intent(in)  current_step 
)

Write the current valid input.

This method overrides equilibrium::equilibrium_write_input. The boundary and other fixed parameters do not get updated as the reconstruction progresses. Need to update them manually if in free boundary mode.

Parameters
[in]thisA siesta_class instance.
[in]current_stepStep number to append to input filename.

The documentation for this interface was generated from the following file: