Stellarator-Tools
metrics.f90 File Reference

Contains module metrics. More...

Modules

module  metrics
 Module for reading in VMEC input and computing metric elements on the SIESTA (sqrt-flux) radial grid. Computes and stores the real-space metric elements, Jacobian based on square root of fluc splined vmec coordinate system.
 

Functions/Subroutines

subroutine metrics::init_metric_elements ()
 Initialize the metric elements. More...
 
subroutine metrics::set_grid_sizes (mpol_in, ntor_in, nfp_in, tor_modes)
 Set grid sizes. More...
 
subroutine metrics::surfavg (average, q3d, nsmin, nsmax)
 Surface average a quantity. More...
 
subroutine metrics::loadgrid (istat)
 Load the R, Z and lambda arrays from VMEC. More...
 
subroutine metrics::rz_to_ijsp (rmn, zmn, lasym)
 Transform from fourier R Z to real space qauntities. More...
 
subroutine metrics::half_mesh_metrics (r1_i, ru_i, rv_i, z1_i, zu_i, zv_i)
 Compute the metric elements on the half mesh. More...
 
subroutine metrics::full_mesh_metrics
 Gets the full grid metric elements. More...
 
subroutine metrics::check_metrics
 @ brief Test to check that we computed the upper metric elements correctly. More...
 
subroutine metrics::toupper (xsubsij, xsubuij, xsubvij,
 Converts to contravariant component full grid. More...
 
subroutine metrics::tolowerh (xsupsij, xsupuij, xsupvij,
 Converts to covariant component half grid. More...
 
subroutine metrics::tolowerf (xsupsij, xsupuij, xsupvij,
 Converts to covariant component full grid. More...
 
subroutine metrics::cleanup_metric_elements
 Deallocate memory containing metric elements on the half mesh. More...
 
subroutine metrics::dealloc_full_lower_metrics
 Deallocate memory containing metric elements on the full mesh.
 

Variables

real(dp), dimension(:,:), allocatable metrics::sqrtg
 Jacobian on half grid.
 
real(dp), dimension(:,:), allocatable metrics::gss
 Lower metric tensor half grid. e_s . e_s.
 
real(dp), dimension(:,:), allocatable metrics::gsu
 Lower metric tensor half grid. e_s . e_u.
 
real(dp), dimension(:,:), allocatable metrics::gsv
 Lower metric tensor half grid. e_s . e_v.
 
real(dp), dimension(:,:), allocatable metrics::guu
 Lower metric tensor half grid. e_u . e_u.
 
real(dp), dimension(:,:), allocatable metrics::guv
 Lower metric tensor half grid. e_u . e_v.
 
real(dp), dimension(:,:), allocatable metrics::gvv
 Lower metric tensor half grid. e_v . e_v.
 
real(dp), dimension(:,:), allocatable metrics::hss
 Upper metric tensor half grid. e^s . e^s.
 
real(dp), dimension(:,:), allocatable metrics::hsu
 Upper metric tensor. e^s . e^u.
 
real(dp), dimension(:,:), allocatable metrics::hsv
 Upper metric tensor. e^s . e^v.
 
real(dp), dimension(:,:), allocatable metrics::huu
 Upper metric tensor. e^u . e^u.
 
real(dp), dimension(:,:), allocatable metrics::huv
 Upper metric tensor. e^u . e^v.
 
real(dp), dimension(:,:), allocatable metrics::hvv
 Upper metric tensor. e^v . e^v.
 
real(dp), dimension(:,:), allocatable metrics::gssf
 Lower metric tensor full grid. e_s . e_s.
 
real(dp), dimension(:,:), allocatable metrics::gsuf
 Lower metric tensor full grid. e_s . e_u.
 
real(dp), dimension(:,:), allocatable metrics::gsvf
 Lower metric tensor full grid. e_s . e_v.
 
real(dp), dimension(:,:), allocatable metrics::guuf
 Lower metric tensor full grid. e_u . e_u.
 
real(dp), dimension(:,:), allocatable metrics::guvf
 Lower metric tensor full grid. e_u . e_v.
 
real(dp), dimension(:,:), allocatable metrics::gvvf
 Lower metric tensor full grid. e_v . e_v.
 
real(dp) metrics::rmax
 Maximum of the grid R inside the last closed flux surface.
 
real(dp) metrics::rmin
 Minimum of the grid R inside the last closed flux surface.
 
real(dp) metrics::zmax
 Maximum of the grid Z inside the last closed flux surface.
 
real(dp) metrics::zmin
 Minimum of the grid Z inside the last closed flux surface.
 
real(dp) metrics::skston
 Start timer.
 
real(dp) metrics::skstoff
 Stop timer.
 

Detailed Description

Contains module metrics.