V3FIT
|
Defines the base class of the type siesta_class. This module contains all the code necessary to interface V3FIT with SIESTA. More...
Data Types | |
type | siesta_class |
Base class representing a siesta_equilibrium. More... | |
interface | siesta_get_gp_ne |
Interface for the siesta guassian process density profile values. More... | |
interface | siesta_get_gp_sxrem |
Interface for the siesta guassian process soft x-ray emissivity profile values. More... | |
interface | siesta_get_gp_te |
Interface for the siesta guassian process electron temperature profile values. More... | |
interface | siesta_get_gp_ti |
Interface for the siesta guassian process ion temperature profile values. More... | |
interface | siesta_get_ne |
Interface for the siesta density profile values. More... | |
interface | siesta_get_p |
Interface for the siesta pressure profile values. More... | |
interface | siesta_get_sxrem |
Interface for the siesta soft x-ray emission profile values. More... | |
interface | siesta_get_te |
Interface for the siesta electron temperature profile values. More... | |
interface | siesta_get_ti |
Interface for the siesta ion temperature profile values. More... | |
type | siesta_magnetic_cache |
Object to cache data needed to compute magnetic signals. More... | |
interface | siesta_set_magnetic_cache |
Interface for the setting the siesta_magnetic_cache types using siesta_set_magnetic_cache_responce, siesta_set_magnetic_cache_point or siesta_set_magnetic_cache_calc. More... | |
Functions/Subroutines | |
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, vmec, state_flags) |
Construct a siesta_class object. More... | |
subroutine | siesta_destruct (this) |
Deconstruct a siesta_class object. More... | |
subroutine | siesta_set_param (this, id, i_index, j_index, value, eq_comm, state_flags) |
Sets the value of a reconstruction equilibrium parameter. More... | |
subroutine | siesta_set_magnetic_cache_responce (this, response_object) |
Set magnetic cache for plasma responce. More... | |
subroutine | siesta_set_magnetic_cache_point (this, use_axi) |
Set magnetic cache initialy. More... | |
subroutine | siesta_set_magnetic_cache_calc (this) |
Set magnetic cache. More... | |
subroutine | siesta_set_namelist (this) |
Sets namelist variables from the solved siesta equilibrium. More... | |
integer function | siesta_get_param_id (this, param_name) |
Get the id for a reconstruction parameter. More... | |
real(rprec) function | siesta_get_param_value (this, id, i_index, j_index) |
Get the value of a reconstruction siesta parameter. More... | |
character(len=data_name_length) function | siesta_get_param_name (this, id) |
Get the name of a reconstruction siesta parameter. More... | |
integer function | siesta_get_gp_ne_num_hyper_param (this) |
Get the number of electron density gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | siesta_get_ne_af (this) |
Gets the electron density profile af array. More... | |
real(rprec) function | siesta_get_gp_ne_ij (this, i, j) |
Get the electron density gp kernel value for the two indicies. More... | |
real(rprec) function | siesta_get_gp_ne_pi (this, x_cart, i) |
Get the electron density gp kernel value for the position and index. More... | |
real(rprec) function | siesta_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 | siesta_get_ne_cart (this, x_cart) |
Gets the electron density at a cartesian position. More... | |
real(rprec) function | siesta_get_ne_radial (this, s) |
Gets the electron density at a s, u=0, v=0 position. More... | |
integer function | siesta_get_gp_te_num_hyper_param (this) |
Get the number of electron temperature gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | siesta_get_te_af (this) |
Gets the electron temperature profile af array. More... | |
real(rprec) function | siesta_get_gp_te_ij (this, i, j) |
Get the electron temperature gp kernel value for the two indicies. More... | |
real(rprec) function | siesta_get_gp_te_pi (this, x_cart, i) |
Get the electron temperature gp kernel value for the position and index. More... | |
real(rprec) function | siesta_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 | siesta_get_te_cart (this, x_cart) |
Gets the electron temperature at a cartesian position. More... | |
real(rprec) function | siesta_get_te_radial (this, s) |
Gets the electron temperature at a s, u=0, v=0 position. More... | |
integer function | siesta_get_gp_ti_num_hyper_param (this) |
Get the number of ion temperature gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | siesta_get_ti_af (this) |
Gets the ion temperature profile af array. More... | |
real(rprec) function | siesta_get_gp_ti_ij (this, i, j) |
Get the ion temperature gp kernel value for the two indicies. More... | |
real(rprec) function | siesta_get_gp_ti_pi (this, x_cart, i) |
Get the ion temperature gp kernel value for the position and index. More... | |
real(rprec) function | siesta_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 | siesta_get_ti_cart (this, x_cart) |
Gets the ion temperature at a cartesian position. More... | |
real(rprec) function | siesta_get_ti_radial (this, s) |
Gets the ion temperature at a s, u=0, v=0 position. More... | |
integer function | siesta_get_gp_sxrem_num_hyper_param (this, index) |
Get the number of soft x-ray emission gp kernel hyper parameters. More... | |
real(rprec) function, dimension(:), pointer | siesta_get_sxrem_af (this, index) |
Gets the soft x-ray emissivity profile af array. More... | |
real(rprec) function | siesta_get_gp_sxrem_ij (this, i, j, index) |
Get the soft x-ray emissivity gp kernel value for the two indicies. More... | |
real(rprec) function | siesta_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 | siesta_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 | siesta_get_sxrem_cart (this, x_cart, index) |
Gets the soft x-ray emissivity at a cartesian position. More... | |
real(rprec) function | siesta_get_sxrem_radial (this, s, index) |
Gets the soft x-ray emissivity at a s, u=0, v=0 position. More... | |
real(rprec) function | siesta_get_p_cart (this, x_cart, normalize) |
Gets the plasma pressure at a cartesian position. More... | |
real(rprec) function | siesta_get_p_radial (this, s, normalize) |
Gets the plasma pressure at a s, u=0, v=0 position. More... | |
real(rprec) function | siesta_get_p_flux (this, flux, normalize) |
Gets the plasma pressure at a flux position. More... | |
real(rprec) function, dimension(3) | siesta_get_b_vec (this, x_cart, cyl) |
Gets the magnetic field vector at a position. More... | |
real(rprec) function | siesta_get_int_b_dphi (this, r, theta) |
Gets the loop integrated magnetic field at a position. More... | |
real(rprec) function, dimension(3) | siesta_get_suv (this, x_cart) |
Gets siesta s value at position. More... | |
integer function | siesta_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 | siesta_get_magnetic_volume_rgrid (this) |
Get volume magnetic volume integration radial grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | siesta_get_magnetic_volume_zgrid (this) |
Get volume magnetic volume integration z grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | siesta_get_magnetic_volume_jrgrid (this) |
Get volume magnetic volume integration jr grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | siesta_get_magnetic_volume_jphigrid (this) |
Get volume magnetic volume integration jphi grid points. More... | |
real(rprec) function, dimension(:,:,:), pointer | siesta_get_magnetic_volume_jzgrid (this) |
Get volume magnetic volume integration jz grid points. More... | |
real(rprec) function | siesta_get_volume_int_element (this) |
Get volume integration element. More... | |
real(rprec) function, dimension(:,:), pointer | siesta_get_con_surface_krgrid (this) |
Get the conducting surface integration kr grid points. More... | |
real(rprec) function, dimension(:,:), pointer | siesta_get_con_surface_kphigrid (this) |
Get the conducting surface integration kphi grid points. More... | |
real(rprec) function, dimension(:,:), pointer | siesta_get_con_surface_kzgrid (this) |
Get the conducting surface integration kz grid points. More... | |
real(rprec) function | siesta_get_area_int_element (this) |
Get area integration element. More... | |
real(rprec) function, dimension(:), pointer | siesta_get_ext_currents (this, num_currents, scale_currents) |
Get external current. More... | |
real(rprec) function, dimension(3) | siesta_get_ext_b_plasma (this, position, axi_only) |
Get external plasma magnetic field. More... | |
real(rprec) function, dimension(3) | siesta_get_int_b_plasma (this, flux) |
Get internal plasma magnetic field. More... | |
integer function | siesta_get_grid_size (this) |
Get radial grid size. More... | |
real(rprec) function | siesta_get_grid_start (this) |
Get start of the radial grid. More... | |
real(rprec) function | siesta_get_grid_stop (this) |
Get radial grid size. More... | |
logical function | siesta_is_scaler_value (this, id) |
Checks if a parameter id is a scaler value. More... | |
logical function | siesta_is_1d_array (this, id) |
Checks if a parameter id is a 1d array. More... | |
logical function | siesta_is_2d_array (this, id) |
Checks if a parameter id is a 2d array. More... | |
logical function | siesta_is_recon_param (this, id) |
Checks if a parameter id is a reconstruction parameter. More... | |
logical function | siesta_is_using_point (this) |
Checks if a the point magnetics are being used. More... | |
logical function | siesta_converge (this, num_iter, iou, eq_comm, state_flags) |
Solves the siesta equilibrium. More... | |
subroutine | siesta_read_vac_file (this, index, eq_comm) |
Loads the vacuum magnetic field file. More... | |
subroutine | siesta_save_state (this) |
Save the internal state of the equilibrium. More... | |
subroutine | siesta_reset_state (this) |
Reset the internal state of the equilibrium. More... | |
subroutine | siesta_write (this, iou) |
Write out the equilibrium to an output file. More... | |
subroutine | siesta_write_input (this, current_step) |
Write the current valid input. More... | |
subroutine | siesta_def_result (this, result_ncid, maxnsetps_dim_id) |
Define NetCDF variables for the result file. More... | |
subroutine | siesta_write_init_data (this, result_ncid) |
Write inital data to NetCDF result file. More... | |
subroutine | siesta_write_step_data (this, result_ncid, current_step) |
Write step data to NetCDF result file. More... | |
subroutine | siesta_restart (this, result_ncid, current_step) |
Restart from a result file. More... | |
subroutine | siesta_sync_state (this, recon_comm) |
Syncronize the siesta state to children. More... | |
subroutine | siesta_sync_child (this, index, recon_comm) |
Syncronize a child siesta state to the parent. More... | |
pure real(rprec) function | siesta_to_vmec_s (s) |
Map the siesta s to the vmec s. More... | |
pure real(rprec) function | siesta_to_siesta_s (s) |
Map the vmec s to the siesta s. More... | |
pure real(rprec) function | siesta_to_i_vmec (s) |
Find the vmec s index. More... | |
pure integer function | siesta_to_i_vmec_low (s) |
Find the lower vmec s index. More... | |
pure real(rprec) function | siesta_to_w_vmec_low (s, ilow) |
Find the lower interplation weighting. More... | |
Variables | |
integer, parameter | siesta_pp_ne_b_id = 59 |
1D Array of function density profile parameters. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ne_as_id = 60 |
1D Array of segment density profile s poitions. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ne_af_id = 61 |
1D Array of segment density profile f values. Defined in pprofile_T. | |
integer, parameter | siesta_pp_sxrem_b_id = 62 |
1D Array of function sxrem profile parameters. Defined in pprofile_T. | |
integer, parameter | siesta_pp_sxrem_as_id = 63 |
1D Array of segment sxrem profile s poitions. Defined in pprofile_T. | |
integer, parameter | siesta_pp_sxrem_af_id = 64 |
1D Array of segment sxrem profile f values. Defined in pprofile_T. | |
integer, parameter | siesta_pp_te_b_id = 65 |
1D Array of function electron temperature profile parameters. Defined in pprofile_T. | |
integer, parameter | siesta_pp_te_as_id = 66 |
1D Array of segment electron temperature profile s poitions. Defined in pprofile_T. | |
integer, parameter | siesta_pp_te_af_id = 67 |
1D Array of segment electron temperature profile f values. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ti_b_id = 68 |
1D Array of function ion temperature profile parameters. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ti_as_id = 69 |
1D Array of segment ion temperature profile s poitions. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ti_af_id = 70 |
1D Array of segment ion temperature profile f values. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ze_b_id = 71 |
1D Array of function zeff profile parameters. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ze_as_id = 72 |
1D Array of segment zeff profile s poitions. Defined in pprofile_T. | |
integer, parameter | siesta_pp_ze_af_id = 73 |
1D Array of segment zeff profile f values. Defined in pprofile_T. | |
integer, parameter | siesta_phi_offset_id = 83 |
Plasma Phi offset. This is a parameter to allow changing the phi angle of a quasi helical state in an RFP. Defined in vmec_equilibrium. | |
integer, parameter | siesta_z_offset_id = 84 |
Plasma z offset. This is a parameter to allow changing the vertical shift of the plasma. | |
integer, parameter | siesta_helpert_id = 85 |
Helical perturbation parameter. | |
Defines the base class of the type siesta_class. This module contains all the code necessary to interface V3FIT with SIESTA.
type (siesta_class) function, pointer siesta_equilibrium::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, | ||
type (vmec_class), pointer | vmec, | ||
integer, intent(inout) | state_flags | ||
) |
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.
[in] | file_name | Filename of the siesta namelist input file. |
[in] | restart_file_name | Filename of the siesta restart file. |
[in] | ne | pprofile_T for the electron density. |
[in] | te | pprofile_T for the electron temperature. |
[in] | ti | pprofile_T for the ion temperature. |
[in] | sxrem | pprofile_T for the soft x-ray emissivity. |
[in] | phi_offset | Initial phi offset of the plasma relative to the diagnostics in radians. |
[in] | z_offset | Initial Z offset of the plasma relative to the machine center. |
[in] | iou | Input/output unit to log messages to. |
[in] | eq_comm | MPI communicator pool for SIESTA. |
[in] | recon_comm | MPI communicator pool for reconstruction. |
[in] | vmec | An instance of a vmec_equilibrium object. |
[in,out] | state_flags | Bitwise flags to indicate which parts of the model changed. |
Definition at line 389 of file siesta_equilibrium.f.
logical function siesta_equilibrium::siesta_converge | ( | type (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.
[in,out] | this | A siesta_class instance. |
[in,out] | num_iter | Counter to track the number of iterations. |
[in] | iou | Input/Output unit of the runlog file. |
[in] | eq_comm | MPI communicator pool for siesta/vmec. |
[in] | state_flags | Bitwise flags to indicate which parts of the model changed. |
Definition at line 4107 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_def_result | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | maxnsetps_dim_id | ||
) |
Define NetCDF variables for the result file.
This method overrides equilibrium::equilibrium_def_result. Defines dimensions and variables for the SIESTA contribution of the result file. Multidimensional arrays need to be transposed so arrays appear in the correct order in non fortran languages.
[in] | this | A siesta_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. |
Definition at line 4506 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_destruct | ( | type (siesta_class), pointer | this | ) |
Deconstruct a siesta_class object.
Deallocates memory and uninitializes a siesta_class object.
[in,out] | this | A siesta_class instance. |
Definition at line 496 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_area_int_element | ( | type (siesta_class), intent(in) | this | ) |
Get area integration element.
This method overrides equilibrium::equilibrium_get_area_int_element. For vmec this is |J||e^s|*du*dv where J is the jacobian. A 1/J term is integrated into kr, kphi and kz. Since due to the resulting |J|/J term, the the sign of the jacobian must be taken into account.
[in] | this | A siesta_class instance. |
Definition at line 3447 of file siesta_equilibrium.f.
real (rprec) function, dimension(3) siesta_equilibrium::siesta_get_b_vec | ( | type (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.
[in] | this | A siesta_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. |
Definition at line 2986 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:), pointer siesta_equilibrium::siesta_get_con_surface_kphigrid | ( | type (siesta_class), intent(in) | this | ) |
Get the conducting surface integration kphi grid points.
This method overrides equilibrium::equilibrium_get_con_surface_kphigrid.
[in] | this | A siesta_class instance. |
Definition at line 3381 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:), pointer siesta_equilibrium::siesta_get_con_surface_krgrid | ( | type (siesta_class), intent(in) | this | ) |
Get the conducting surface integration kr grid points.
This method overrides equilibrium::equilibrium_get_con_surface_krgrid.
[in] | this | A siesta_class instance. |
Definition at line 3351 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:), pointer siesta_equilibrium::siesta_get_con_surface_kzgrid | ( | type (siesta_class), intent(in) | this | ) |
Get the conducting surface integration kz grid points.
This method overrides equilibrium::equilibrium_get_con_surface_kzgrid.
[in] | this | A siesta_class instance. |
Definition at line 3411 of file siesta_equilibrium.f.
real (rprec) function, dimension(3) siesta_equilibrium::siesta_get_ext_b_plasma | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | position | Position to compute the fields at in cylindrical coordinates. |
[in] | axi_only | Gives only the axisymmtric component of the magnetic field. |
Definition at line 3521 of file siesta_equilibrium.f.
real (rprec) function, dimension(:), pointer siesta_equilibrium::siesta_get_ext_currents | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | num_currents, | ||
logical, intent(out) | scale_currents | ||
) |
Get external current.
This method overrides equilibrium::equilibrium_get_ext_currents. External currents are defered to the underlying vmec.
[in] | this | A siesta_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. |
Definition at line 3483 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_ne_ij | ( | type (siesta_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 overrides equilibrium::equilibrium_get_gp_ne_ij. If no density profile was created zero is returned.
[in] | this | A siesta_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
Definition at line 1843 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_gp_ne_num_hyper_param | ( | type (siesta_class), intent(in) | this | ) |
Get the number of electron density gp kernel hyper parameters.
This method overrides equilibrium::equilibrium_get_gp_ne_num_hyper_param. If no density profile was created zero is returned.
[in] | this | A siesta_class instance. |
Definition at line 1775 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_ne_pi | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
[in] | i | Profile position index. |
Definition at line 1880 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_ne_pp | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | First cartesian position to get the electron density at. |
[in] | y_cart | Second cartesian position to get the electron density at. |
Definition at line 1922 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_sxrem_ij | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
integer, intent(in) | index | ||
) |
Get the soft x-ray emissivity gp kernel value for the two indicies.
This method overrides equilibrium::equilibrium_get_gp_sxrem_ij. If no soft x-ray emissivity profile was created zero is returned.
[in] | this | A siesta_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
[in] | index | Index of the soft x-ray emissivity profile. |
Definition at line 2610 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_gp_sxrem_num_hyper_param | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Get the number of soft x-ray emission gp kernel hyper parameters.
This method overrides equilibrium::equilibrium_get_gp_sxrem_num_hyper_param. If no soft x-ray emission profile was created zero is returned.
[in] | this | A vmec_class instance. |
[in] | index | Index of the soft x-ray emissivity profile. |
Definition at line 2534 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_sxrem_pi | ( | type (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.
[in] | this | A siesta_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. |
Definition at line 2652 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_sxrem_pp | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | First cartesian position to get the soft x-ray emissivity at. |
[in] | y_cart | Second cartesian position to get the soft x-ray emissivity at. |
[in] | index | Index of the soft x-ray emissivity profile. |
Definition at line 2699 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_te_ij | ( | type (siesta_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 overrides equilibrium::equilibrium_get_gp_te_ij. If no electron temperature profile was created zero is returned.
[in] | this | A siesta_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
Definition at line 2096 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_gp_te_num_hyper_param | ( | type (siesta_class), intent(in) | this | ) |
Get the number of electron temperature gp kernel hyper parameters.
This method overrides equilibrium::equilibrium_get_gp_te_num_hyper_param. If no electron temperature profile was created zero is returned.
[in] | this | A siesta_class instance. |
Definition at line 2026 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_te_pi | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
[in] | i | Profile position index. |
Definition at line 2134 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_te_pp | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | First cartesian position to get the electron temperature at. |
[in] | y_cart | Second cartesian position to get the electron temperature at. |
Definition at line 2178 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_ti_ij | ( | type (siesta_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 overrides equilibrium::equilibrium_get_gp_te_ij. If no ion temperature profile was created zero is returned.
[in] | this | A siesta_class instance. |
[in] | i | ith profile position. |
[in] | j | jth profile position. |
Definition at line 2352 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_gp_ti_num_hyper_param | ( | type (siesta_class), intent(in) | this | ) |
Get the number of ion temperature gp kernel hyper parameters.
This method overrides equilibrium::equilibrium_get_gp_ti_num_hyper_param. If no ion temperature profile was created zero is returned.
[in] | this | A siesta_class instance. |
Definition at line 2282 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_ti_pi | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the ion temperature at. |
[in] | i | Profile position index. |
Definition at line 2389 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_gp_ti_pp | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | First cartesian position to get the ion temperature at. |
[in] | y_cart | Second cartesian position to get the ion temperature at. |
Definition at line 2429 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_grid_size | ( | type (siesta_class), intent(in) | this | ) |
Get radial grid size.
This method overrides equilibrium::equilibrium_get_grid_size.
[in] | this | A siesta_class instance. |
Definition at line 3811 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_grid_start | ( | type (siesta_class), intent(in) | this | ) |
Get start of the radial grid.
This method overrides equilibrium::equilibrium_get_grid_start.
[in] | this | A siesta_class instance. |
Definition at line 3843 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_grid_stop | ( | type (siesta_class), intent(in) | this | ) |
Get radial grid size.
This method overrides equilibrium::equilibrium_get_grid_size.
[in] | this | A siesta_class instance. |
Definition at line 3869 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_int_b_dphi | ( | type (siesta_class), intent(in) | this, |
real (rprec), intent(in) | r, | ||
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]
[in] | this | A siesta_class instance. |
[in] | r | S position to integrate about. |
[in] | theta | U angle to integrate about. |
Definition at line 3042 of file siesta_equilibrium.f.
real (rprec) function, dimension(3) siesta_equilibrium::siesta_get_int_b_plasma | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | flux | Position to compute the fields at in cylindrical coordinates. |
Definition at line 3629 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:,:), pointer siesta_equilibrium::siesta_get_magnetic_volume_jphigrid | ( | type (siesta_class), intent(in) | this | ) |
Get volume magnetic volume integration jphi grid points.
This method overrides equilibrium::equilibrium_get_magnetic_volume_jphigrid.
[in] | this | A siesta_class instance. |
Definition at line 3253 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:,:), pointer siesta_equilibrium::siesta_get_magnetic_volume_jrgrid | ( | type (siesta_class), intent(in) | this | ) |
Get volume magnetic volume integration jr grid points.
This method overrides equilibrium::equilibrium_get_magnetic_volume_jrgrid.
[in] | this | A siesta_class instance. |
Definition at line 3223 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:,:), pointer siesta_equilibrium::siesta_get_magnetic_volume_jzgrid | ( | type (siesta_class), intent(in) | this | ) |
Get volume magnetic volume integration jz grid points.
This method overrides equilibrium::equilibrium_get_magnetic_volume_jzgrid.
[in] | this | A siesta_class instance. |
Definition at line 3283 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:,:), pointer siesta_equilibrium::siesta_get_magnetic_volume_rgrid | ( | type (siesta_class), intent(in) | this | ) |
Get volume magnetic volume integration radial grid points.
This method overrides equilibrium::equilibrium_get_magnetic_volume_rgrid.
[in] | this | A siesta_class instance. |
Definition at line 3163 of file siesta_equilibrium.f.
real (rprec) function, dimension(:,:,:), pointer siesta_equilibrium::siesta_get_magnetic_volume_zgrid | ( | type (siesta_class), intent(in) | this | ) |
Get volume magnetic volume integration z grid points.
This method overrides equilibrium::equilibrium_get_magnetic_volume_zgrid.
[in] | this | A siesta_class instance. |
Definition at line 3193 of file siesta_equilibrium.f.
real (rprec) function, dimension(:), pointer siesta_equilibrium::siesta_get_ne_af | ( | type (siesta_class), intent(in) | this | ) |
Gets the electron density profile af array.
This method overrides equilibrium::equilibrium_get_ne_af. If no density profile was created a null pointer is returned.
[in] | this | A siesta_class instance. |
Definition at line 1810 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_ne_cart | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the electron density at. |
Definition at line 1961 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_ne_radial | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | s | Radial position to get the electron density at. |
Definition at line 1994 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_p_cart | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the plasma pressure at. |
[in] | normalize | Normalize the pressure value. |
Definition at line 2822 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_p_flux | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | s | Radial position to get the electron density at. |
[in] | normalize | Normalize the pressure value. |
Definition at line 2891 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_p_radial | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | s | Cartesian position to get the plasma pressure at. |
[in] | normalize | Normalize the pressure value. |
Definition at line 2856 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_param_id | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | param_name | Name of a reconstruction parameter. |
Definition at line 1527 of file siesta_equilibrium.f.
character(len=data_name_length) function siesta_equilibrium::siesta_get_param_name | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | id | ID of the parameter. |
Definition at line 1693 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_param_value | ( | type (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.
[in] | this | A siesta_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. |
Definition at line 1610 of file siesta_equilibrium.f.
integer function siesta_equilibrium::siesta_get_plasma_edge | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | phi | Toroidal angle to determine the outer surface at. |
[in,out] | r | The radial postions of the other surface in a single toroidal angle. |
[in,out] | z | The Z postions of the other surface in a single toroidal angle. |
Definition at line 3128 of file siesta_equilibrium.f.
real (rprec) function, dimension(3) siesta_equilibrium::siesta_get_suv | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the s position at. |
Definition at line 3088 of file siesta_equilibrium.f.
real (rprec) function, dimension(:), pointer siesta_equilibrium::siesta_get_sxrem_af | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | index | ||
) |
Gets the soft x-ray emissivity profile af array.
This method overrides equilibrium::equilibrium_get_sxrem_af. If no soft x-ray emissivity profile was created a null pointer is returned.
[in] | this | A siesta_class instance. |
[in] | index | Index of the soft x-ray emissivity profile. |
Definition at line 2572 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_sxrem_cart | ( | type (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.
[in] | this | A siesta_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. |
Definition at line 2742 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_sxrem_radial | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | s | Radial position to get the electron density at. |
[in] | index | Index of the soft x-ray emissivity profile. |
Definition at line 2783 of file siesta_equilibrium.f.
real (rprec) function, dimension(:), pointer siesta_equilibrium::siesta_get_te_af | ( | type (siesta_class), intent(in) | this | ) |
Gets the electron temperature profile af array.
This method overrides equilibrium::equilibrium_get_te_af. If no electron temperature profile was created a null pointer is returned.
[in] | this | A siesta_class instance. |
Definition at line 2061 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_te_cart | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the electron temperature at. |
Definition at line 2217 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_te_radial | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | s | Radial position to get the electron density at. |
Definition at line 2250 of file siesta_equilibrium.f.
real (rprec) function, dimension(:), pointer siesta_equilibrium::siesta_get_ti_af | ( | type (siesta_class), intent(in) | this | ) |
Gets the ion temperature profile af array.
This method overrides equilibrium::equilibrium_get_ti_af. If no ion temperature profile was created a null pointer is returned.
[in] | this | A siesta_class instance. |
Definition at line 2317 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_ti_cart | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | x_cart | Cartesian position to get the ion temperature at. |
Definition at line 2468 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_ti_radial | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | s | Radial position to get the ion density at. |
Definition at line 2501 of file siesta_equilibrium.f.
real (rprec) function siesta_equilibrium::siesta_get_volume_int_element | ( | type (siesta_class), intent(in) | this | ) |
Get volume integration element.
This method overrides equilibrium::equilibrium_get_volume_int_element. For vmec this is J*ds*du*dv where J is the jacobian. The jacobian is integrated into Jr, Jphi and Jz but still need to account for the sign of the jacobian.
[in] | this | A siesta_class instance. |
Definition at line 3319 of file siesta_equilibrium.f.
logical function siesta_equilibrium::siesta_is_1d_array | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | id | ID of the parameter. |
Definition at line 3936 of file siesta_equilibrium.f.
logical function siesta_equilibrium::siesta_is_2d_array | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Checks if a parameter id is a 2d array.
This method overrides equilibrium::equilibrium_is_2d_array.
[in] | this | A siesta_class instance. |
[in] | id | ID of the parameter. |
Definition at line 3977 of file siesta_equilibrium.f.
logical function siesta_equilibrium::siesta_is_recon_param | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | id | ID of the parameter. |
Definition at line 4016 of file siesta_equilibrium.f.
logical function siesta_equilibrium::siesta_is_scaler_value | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | id | ||
) |
Checks if a parameter id is a scaler value.
This method overrides equilibrium::equilibrium_is_scaler_value.
[in] | this | A siesta_class instance. |
[in] | id | ID of the parameter. |
Definition at line 3899 of file siesta_equilibrium.f.
logical function siesta_equilibrium::siesta_is_using_point | ( | type (siesta_class), intent(in) | this | ) |
Checks if a the point magnetics are being used.
This method overrides equilibrium::equilibrium_is_using_point.
[in] | this | A siesta_class instance. |
Definition at line 4060 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_read_vac_file | ( | type (siesta_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 the mgrid file. The extcur array will need to be broadcast to the child processes.
[in] | this | A siesta_class instance. |
[in] | index | Index of the changed current. |
[in] | eq_comm | MPI communicator pool for siesta. |
Definition at line 4226 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_reset_state | ( | type (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.
[in,out] | this | A siesta_class instance. |
Definition at line 4300 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_restart | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step | ||
) |
Restart from a result file.
This method overrides equilibrium::equilibrium_restart.
[in] | this | A siesta_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | current_step | Step index to write variables to. |
Definition at line 4601 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_save_state | ( | type (siesta_class), intent(inout) | this | ) |
Save the internal state of the equilibrium.
Saves the siesta state. Also saves the vmec state.
[in,out] | this | A siesta_class instance. |
Definition at line 4247 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_set_magnetic_cache_calc | ( | type (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.
[in,out] | this | A siesta_class instance. |
Definition at line 936 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_set_magnetic_cache_point | ( | type (siesta_class), intent(inout) | this, |
logical, intent(in) | use_axi | ||
) |
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.
[in,out] | this | A siesta_class instance. |
[in] | use_axi | Magnetics can subtract off axisymmetric components. |
Definition at line 868 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_set_magnetic_cache_responce | ( | type (siesta_class), intent(inout) | this, |
type (magnetic_response_class), intent(in) | response_object | ||
) |
Set magnetic cache for plasma responce.
This method overrides equilibrium::equilibrium_set_magnetic_cache. This allocates a siesta_magnetic_cache structure. Point measurements require no array allocations.
[in,out] | this | A siesta_class instance. |
[in] | response_object | A magnetic_response::magnetic_response_class instance. |
Definition at line 778 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_set_namelist | ( | type (siesta_class), intent(in) | this | ) |
Sets namelist variables from the solved siesta equilibrium.
This method updates the pertubration size and vmec namelist inputs.
[in] | this | A siesta_class instance. |
Definition at line 1496 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_set_param | ( | type (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.
[in,out] | this | A siesta_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. |
Definition at line 658 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_sync_child | ( | type (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.
[in,out] | this | A siesta_class instance. |
[in] | index | Reconstruction rank to sync. |
[in] | recon_comm | MPI communicator for the reconstruction processes. |
Definition at line 4691 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_sync_state | ( | type (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.
[in,out] | this | A siesta_class instance. |
[in] | recon_comm | MPI communicator for the reconstruction processes. |
Definition at line 4634 of file siesta_equilibrium.f.
pure real (rprec) function siesta_equilibrium::siesta_to_i_vmec | ( | real (rprec), intent(in) | s | ) |
Find the vmec s index.
Given a siesta s_s, find the index corresponding to the vmec grid. This is the non integer position coresponding to the absolute i position. The normalized vmec toroidal flux s_v corresponding to a vmec index i is.
s_v = (i - 1)*ds_v (1)
where radial grid spacing ds_v is
ds_v = 1/(ns - 1) (2)
Inverting equation (1), provides the index for a given s.
i = s_v/ds_v + 1 (3)
[in] | s | A position on the siesta radial grid. |
Definition at line 4799 of file siesta_equilibrium.f.
pure integer function siesta_equilibrium::siesta_to_i_vmec_low | ( | real (rprec), intent(in) | s | ) |
Find the lower vmec s index.
Given a siesta s_s, round down to the nearist integer after mapping the siesta radial position to the absolute vmec index.
[in] | s | A position on the siesta radial grid. |
Definition at line 4822 of file siesta_equilibrium.f.
pure real (rprec) function siesta_equilibrium::siesta_to_siesta_s | ( | real (rprec), intent(in) | s | ) |
Map the vmec s to the siesta s.
The siesta s_v is function of the vmec s_s using the forumla,
s_s(s_v) = Sqrt(s_v) (1)
[in] | s | A position on the siesta radial grid. |
Definition at line 4766 of file siesta_equilibrium.f.
pure real (rprec) function siesta_equilibrium::siesta_to_vmec_s | ( | real (rprec), intent(in) | s | ) |
Map the siesta s to the vmec s.
The vmec s_v is function of the siesta s_s using the forumla,
s_v(s_s) = s_s^2 (1)
[in] | s | A position on the siesta radial grid. |
Definition at line 4743 of file siesta_equilibrium.f.
pure real (rprec) function siesta_equilibrium::siesta_to_w_vmec_low | ( | real (rprec), intent(in) | s, |
integer, intent(in) | ilow | ||
) |
Find the lower interplation weighting.
Given a siesta s_s and a the lower vmec index i, find how much the lower index is biased. When s_s corresponds to the lower index, it should be fully weighed.
1 = m*i_low + b (1)
When s_s corresponds to the lower index + 1, it should be weighted to zero.
0 = m*(i_low + 1) + b (2)
Solving this system of equations, maps the the s_s to the weight.
w_low = m*i + b (3)
The slope m and y intercept b are
m = -1 (4)
b = 1 + i_low (5)
[in] | s | A position on the siesta radial grid. |
[in] | ilow | Nearest lower index. |
Definition at line 4862 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_write | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | iou | ||
) |
Write out the equilibrium to an output file.
This method overrides equilibrium::equilibrium_write.
[in] | this | A siesta_class instance. |
[in] | iou | Input/output unit of the output file. |
Definition at line 4354 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_write_init_data | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | result_ncid | ||
) |
Write inital data to NetCDF result file.
This method overrides equilibrium::equilibrium_write_init_data.
[in] | this | A siesta_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
Definition at line 4535 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_write_input | ( | type (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.
[in] | this | A siesta_class instance. |
[in] | current_step | Step number to append to input filename. |
Definition at line 4424 of file siesta_equilibrium.f.
subroutine siesta_equilibrium::siesta_write_step_data | ( | type (siesta_class), intent(in) | this, |
integer, intent(in) | result_ncid, | ||
integer, intent(in) | current_step | ||
) |
Write step data to NetCDF result file.
This method overrides equilibrium::equilibrium_write_step_data.
[in] | this | A siesta_class instance. |
[in] | result_ncid | NetCDF file id of the result file. |
[in] | current_step | Step index to write variables to. |
Definition at line 4567 of file siesta_equilibrium.f.