PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Public Member Functions | Public Attributes | List of all members
grid_vars::grid_type Type Reference

Type for grids. More...

Public Member Functions

procedure init => init_grid
 initialize More...
 
procedure copy => copy_grid
 copy More...
 
procedure dealloc => dealloc_grid
 deallocate More...
 

Public Attributes

integer, dimension(3) n
 tot nr. of points More...
 
integer loc_n_r
 local nr. of normal points More...
 
integer i_min
 min. normal index of this process in full arrays More...
 
integer i_max
 max. normal index of this process in full arrays More...
 
logical divided
 whether the grid is split up among the processes More...
 
real(dp), dimension(:), pointer r_e => null()
 E(quilibrium) coord. values at n points. More...
 
real(dp), dimension(:), pointer r_f => null()
 F(lux) coord. values at n points. More...
 
real(dp), dimension(:), pointer loc_r_e => null()
 E(quilibrium) coord. values at n points. More...
 
real(dp), dimension(:), pointer loc_r_f => null()
 F(lux) coord. values at n points. More...
 
real(dp), dimension(:,:,:), pointer theta_e => null()
 E(quilibrium) coord. values of first angle at n points in 3-D. More...
 
real(dp), dimension(:,:,:), pointer theta_f => null()
 F(lux) coord. values of first angle at n points in 3-D. More...
 
real(dp), dimension(:,:,:), pointer zeta_e => null()
 E(quilibrium) coord. values of second angle at n points in 3-D. More...
 
real(dp), dimension(:,:,:), pointer zeta_f => null()
 F(lux) coord. values of second angle at n points in 3-D. More...
 
real(dp), dimension(:,:,:,:,:), allocatable trigon_factors
 trigonometric factor cosine for the inverse fourier transf. More...
 
real(dp) estim_mem_usage
 estimated memory usage More...
 

Detailed Description

Type for grids.

The grids are saved in the following format: (angle_1,angle_2,r), where angle_1 and angle_2 can be any angle that completely describe a flux surface.

For example, they can refer to a grid of \(\theta\) and \(\zeta\) values, but they can also refer to (Modified) flux coordinates with a parallel angle and a field line coordinate ( \(\alpha\)).

For field-aligned grids, angle_1 is generally chosen equal to the parallel coordinate in the Flux coordinate system, and angle_2 equal to the field line label (so the second dimension of the matrices is then chosen to be of size 1 for the calculations on a single field line).

At the same time, the parallel coordinate, in which integrations will have to be done, ocupies the first index. This is good for numerical efficiency.

For specific equilibrium grids, such as the case for HELENA equilibria, angle_1 corresponds to \(\theta\) and angle_2 to the symmetry angle \(\zeta\).

It is important that this order of the coordinates in space is consistent among all the variables.

Definition at line 59 of file grid_vars.f90.

Member Function/Subroutine Documentation

◆ copy()

procedure grid_vars::grid_type::copy

copy

Definition at line 81 of file grid_vars.f90.

◆ dealloc()

procedure grid_vars::grid_type::dealloc

deallocate

Definition at line 83 of file grid_vars.f90.

◆ init()

procedure grid_vars::grid_type::init

initialize

Definition at line 79 of file grid_vars.f90.

Member Data Documentation

◆ divided

logical grid_vars::grid_type::divided

whether the grid is split up among the processes

Definition at line 64 of file grid_vars.f90.

◆ estim_mem_usage

real(dp) grid_vars::grid_type::estim_mem_usage

estimated memory usage

Note
Debug version only

Definition at line 75 of file grid_vars.f90.

◆ i_max

integer grid_vars::grid_type::i_max

max. normal index of this process in full arrays

Definition at line 63 of file grid_vars.f90.

◆ i_min

integer grid_vars::grid_type::i_min

min. normal index of this process in full arrays

Definition at line 62 of file grid_vars.f90.

◆ loc_n_r

integer grid_vars::grid_type::loc_n_r

local nr. of normal points

Definition at line 61 of file grid_vars.f90.

◆ loc_r_e

real(dp), dimension(:), pointer grid_vars::grid_type::loc_r_e => null()

E(quilibrium) coord. values at n points.

Definition at line 67 of file grid_vars.f90.

◆ loc_r_f

real(dp), dimension(:), pointer grid_vars::grid_type::loc_r_f => null()

F(lux) coord. values at n points.

Definition at line 68 of file grid_vars.f90.

◆ n

integer, dimension(3) grid_vars::grid_type::n

tot nr. of points

Definition at line 60 of file grid_vars.f90.

◆ r_e

real(dp), dimension(:), pointer grid_vars::grid_type::r_e => null()

E(quilibrium) coord. values at n points.

Definition at line 65 of file grid_vars.f90.

◆ r_f

real(dp), dimension(:), pointer grid_vars::grid_type::r_f => null()

F(lux) coord. values at n points.

Definition at line 66 of file grid_vars.f90.

◆ theta_e

real(dp), dimension(:,:,:), pointer grid_vars::grid_type::theta_e => null()

E(quilibrium) coord. values of first angle at n points in 3-D.

Definition at line 69 of file grid_vars.f90.

◆ theta_f

real(dp), dimension(:,:,:), pointer grid_vars::grid_type::theta_f => null()

F(lux) coord. values of first angle at n points in 3-D.

Definition at line 70 of file grid_vars.f90.

◆ trigon_factors

real(dp), dimension(:,:,:,:,:), allocatable grid_vars::grid_type::trigon_factors

trigonometric factor cosine for the inverse fourier transf.

Definition at line 73 of file grid_vars.f90.

◆ zeta_e

real(dp), dimension(:,:,:), pointer grid_vars::grid_type::zeta_e => null()

E(quilibrium) coord. values of second angle at n points in 3-D.

Definition at line 71 of file grid_vars.f90.

◆ zeta_f

real(dp), dimension(:,:,:), pointer grid_vars::grid_type::zeta_f => null()

F(lux) coord. values of second angle at n points in 3-D.

Definition at line 72 of file grid_vars.f90.


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