Stellarator-Tools
Loading...
Searching...
No Matches
vacuum_equilibrium::vacuum_class Interface Reference

Base class representing a vacuum_equilibrium. More...

Inheritance diagram for vacuum_equilibrium::vacuum_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 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 vacuum parameter.
 
procedure get_param_name (this, id)
 Get the name of a reconstruction vacuum parameter.
 
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_ext_currents (this, num_currents, scale_currents)
 Get external current.
 
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 write (this, iou)
 Write out the equilibrium to an output file.
 
procedure write_input (this, current_step)
 Write the current valid input.
 
FINAL vacuum_destruct (this)
 Deconstruct a vacuum_class object.
 
type(vacuum_class) function, pointer vacuum_construct (file_name, iou, force_solve)
 Construct a vacuum_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) vacuum_file_name
 File name of the vacuum namelist inout file.
 
real(rprec), dimension(:), pointer extcur => null()
 Array of external currents.
 
- 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 vacuum_equilibrium.

Interface for vacuum constructor.

Super Class:
equilibrium

Member Function/Subroutine Documentation

◆ get_b_vec()

procedure vacuum_equilibrium::vacuum_class::get_b_vec ( class (vacuum_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 vacuum_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_currents()

procedure vacuum_equilibrium::vacuum_class::get_ext_currents ( class (vacuum_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. The array memory containing the external currents is owned by the vacuum_class. Return a pointer to it.

Parameters
[in]thisA vacuum_class instance.
[in]num_currentsForces the number of currents to return if greater than zero.
[out]scale_currentsInforms the caller that currents need to be scaled.
Returns
The external currents.

◆ get_int_b_dphi()

procedure vacuum_equilibrium::vacuum_class::get_int_b_dphi ( class (vacuum_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. In this function, r and theta are spherical coordinates. The r is transformed into a cylindical radius at some z position. The magnetic field is integrated about a loop at that r-z position. This computes Int[B*dl]

Parameters
[in]thisA vacuum_class instance.
[in]sRadial position to integrate about.
[in]thetaTheta angle to integrate about.
Returns
The loop integrated magnetic field at x_cart.

◆ get_param_id()

procedure vacuum_equilibrium::vacuum_class::get_param_id ( class (vacuum_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 vacuum_class instance.
[in]param_nameName of a reconstruction parameter.
Returns
The id for a reconstruction parameter.

◆ get_param_name()

procedure vacuum_equilibrium::vacuum_class::get_param_name ( class (vacuum_class), intent(in)  this,
integer, intent(in)  id 
)

Get the name of a reconstruction vacuum parameter.

This method overrides equilibrium::equilibrium_get_param_name.

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

◆ get_param_value()

procedure vacuum_equilibrium::vacuum_class::get_param_value ( class (vacuum_class), intent(in)  this,
integer, intent(in)  id,
integer, intent(in)  i_index,
integer, intent(in)  j_index 
)

Get the value of a reconstruction vacuum parameter.

This method overrides equilibrium::equilibrium_get_param_value.

Parameters
[in]thisA vacuum_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_type()

procedure vacuum_equilibrium::vacuum_class::get_type ( class (vacuum_class), intent(in)  this)

Gets a discription of the equilibrium type.

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

◆ is_1d_array()

procedure vacuum_equilibrium::vacuum_class::is_1d_array ( class (vacuum_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 vacuum_class instance.
[in]idID of the parameter.
Returns
True if the parameter is a 1d array and false if otherwise.

◆ is_recon_param()

procedure vacuum_equilibrium::vacuum_class::is_recon_param ( class (vacuum_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 vacuum_class instance.
[in]idID of the parameter.
Returns
True if the parameter is a reconstruction parameter and false if otherwise.

◆ set_param()

procedure vacuum_equilibrium::vacuum_class::set_param ( class (vacuum_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. This function always returns false because a vacuum equilibrium never needs to be reconverged.

Parameters
[in,out]thisA vaccum_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.

◆ vacuum_construct()

type (vacuum_class) function, pointer vacuum_equilibrium::vacuum_class::vacuum_construct ( character (len=*), intent(in)  file_name,
integer, intent(in)  iou,
logical, intent(in)  force_solve 
)

Construct a vacuum_class object.

Allocates memory and initializes a vacuum_class object.

Parameters
[in]file_nameFilename of the vacuum namelist input file.
[in]iouInput/output unit to log messages to.
[in]force_solveIf true, forces the equilbirum to resolve every time.
Returns
A pointer to a constructed vacuum_class object.

◆ vacuum_destruct()

FINAL vacuum_equilibrium::vacuum_class::vacuum_destruct ( type (vacuum_class), intent(inout)  this)
final

Deconstruct a vacuum_class object.

Deallocates memory and uninitializes a vacuum_class object.

Parameters
[in,out]thisA vacuum_class instance.

◆ write()

procedure vacuum_equilibrium::vacuum_class::write ( class (vacuum_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 vacuum_class instance.
[in]iouInput/output unit of the output file.

◆ write_input()

procedure vacuum_equilibrium::vacuum_class::write_input ( class (vacuum_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 vacuum_class instance.
[in]current_stepStep number to append to input filename.

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