PB3D [2.47]
Ideal linear high-n MHD stability in 3-D
Loading...
Searching...
No Matches
grid_vars Module Reference

Variables pertaining to the different grids used. More...

Interfaces and Types

type  grid_type
 Type for grids. More...

Functions/Subroutines

integer function init_grid (grid, n, i_lim, divided)
 Initializes a new grid.
subroutine dealloc_grid (grid)
 Deallocates a grid.
integer function copy_grid (grid_i, grid_o)
 Deep copy of a grid.

Variables

integer, public n_r_in
 nr. of normal points in input grid
integer, public n_r_eq
 nr. of normal points in equilibrium grid
integer, public n_r_x
 nr. of normal points in perturbation grid
integer, public n_r_sol
 nr. of normal points in solution grid
integer, public n_alpha
 nr. of field-lines
real(dp), public min_par_x
 min. of parallel coordinate [ \(\pi\)] in field-aligned grid
real(dp), public max_par_x
 max. of parallel coordinate [ \(\pi\)] in field-aligned grid
real(dp), public min_alpha
 min. of field-line label [ \(\pi\)] in field-aligned grid
real(dp), public max_alpha
 max. of field-line label [ \(\pi\)] in field-aligned grid
real(dp), dimension(:), allocatable, public alpha
 field line label alpha
integer, public n_alloc_grids
 nr. of allocated grids
integer, public n_alloc_discs
 nr. of allocated discretizations

Detailed Description

Variables pertaining to the different grids used.

Function/Subroutine Documentation

◆ copy_grid()

integer function grid_vars::copy_grid ( class(grid_type), intent(in) grid_i,
type(grid_type), intent(inout) grid_o )

Deep copy of a grid.

Note
Does not copy possible trigoniometric factors.
Returns
ierr
Parameters
[in]grid_igrid to be copied
[in,out]grid_ocopied grid

Definition at line 266 of file grid_vars.f90.

Here is the call graph for this function:

◆ dealloc_grid()

subroutine grid_vars::dealloc_grid ( class(grid_type), intent(inout) grid)

Deallocates a grid.

Parameters
[in,out]gridgrid to be deallocated

Definition at line 202 of file grid_vars.f90.

Here is the call graph for this function:

◆ init_grid()

integer function grid_vars::init_grid ( class(grid_type), intent(inout) grid,
integer, dimension(3), intent(in) n,
integer, dimension(2), intent(in), optional i_lim,
logical, intent(in), optional divided )

Initializes a new grid.

Optionally, the local limits can be provided for a divided grid.

Optionally, it can be set whether the grid is divided or not. A situation where this is useful is when only a subset of MPI processes is used to calculate the solution in SLEPC. In this case, the extra ranks all only contain the last grid point, and the last used process has as upper limit this same grid point. This way, all the procedures are reusable, but in this case if only one process is used, this procedure becomes confused and sets this process to undivided. In most cases, this functionality probably does not need to be used.

Returns
ierr
Parameters
[in,out]gridgrid to be initialized
[in]ntot. nr. of points (par,r,alpha)
[in]i_limmin. and max. local normal index
[in]divideddivided grid or not

Definition at line 101 of file grid_vars.f90.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ alpha

real(dp), dimension(:), allocatable, public grid_vars::alpha

field line label alpha

Definition at line 28 of file grid_vars.f90.

◆ max_alpha

real(dp), public grid_vars::max_alpha

max. of field-line label [ \(\pi\)] in field-aligned grid

Definition at line 27 of file grid_vars.f90.

◆ max_par_x

real(dp), public grid_vars::max_par_x

max. of parallel coordinate [ \(\pi\)] in field-aligned grid

Definition at line 25 of file grid_vars.f90.

◆ min_alpha

real(dp), public grid_vars::min_alpha

min. of field-line label [ \(\pi\)] in field-aligned grid

Definition at line 26 of file grid_vars.f90.

◆ min_par_x

real(dp), public grid_vars::min_par_x

min. of parallel coordinate [ \(\pi\)] in field-aligned grid

Definition at line 24 of file grid_vars.f90.

◆ n_alloc_discs

integer, public grid_vars::n_alloc_discs

nr. of allocated discretizations

Note
Debug version only

Definition at line 31 of file grid_vars.f90.

◆ n_alloc_grids

integer, public grid_vars::n_alloc_grids

nr. of allocated grids

Note
Debug version only

Definition at line 30 of file grid_vars.f90.

◆ n_alpha

integer, public grid_vars::n_alpha

nr. of field-lines

Definition at line 23 of file grid_vars.f90.

◆ n_r_eq

integer, public grid_vars::n_r_eq

nr. of normal points in equilibrium grid

Definition at line 20 of file grid_vars.f90.

◆ n_r_in

integer, public grid_vars::n_r_in

nr. of normal points in input grid

Definition at line 19 of file grid_vars.f90.

◆ n_r_sol

integer, public grid_vars::n_r_sol

nr. of normal points in solution grid

Definition at line 22 of file grid_vars.f90.

◆ n_r_x

integer, public grid_vars::n_r_x

nr. of normal points in perturbation grid

Definition at line 21 of file grid_vars.f90.