PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Interfaces and Types | Functions/Subroutines | Variables
vac_vars Module Reference

Variables pertaining to the vacuum quantities. More...

Interfaces and Types

type  vac_type
 vacuum type More...
 

Functions/Subroutines

integer function init_vac (vac, style, n_bnd, prim_X, n_ang, jq)
 Initializes a vacuum type. More...
 
subroutine, public set_loc_lims (n_loc, bs, ind_p, n_p, lims)
 Calculates the limits in local index. More...
 
subroutine dealloc_vac (vac)
 Deallocates vacuum variables. More...
 
integer function, public copy_vac (vac, vac_copy)
 Copy a vacuum type. More...
 
logical function, public in_context (ctxt)
 Indicates whether current process is in the context. More...
 

Variables

integer, public n_alloc_vacs
 nr. of allocated vacs More...
 

Detailed Description

Variables pertaining to the vacuum quantities.

Function/Subroutine Documentation

◆ copy_vac()

integer function, public vac_vars::copy_vac ( class(vac_type), intent(in)  vac,
class(vac_type), intent(inout)  vac_copy 
)

Copy a vacuum type.

Note
The copy should be unallocated.
Parameters
[in]vacvac to be copied
[in,out]vac_copycopy

Definition at line 339 of file vac_vars.f90.

+ Here is the caller graph for this function:

◆ dealloc_vac()

subroutine vac_vars::dealloc_vac ( class(vac_type), intent(inout)  vac)

Deallocates vacuum variables.

Parameters
[in,out]vacvacuum variables to be deallocated

Definition at line 287 of file vac_vars.f90.

+ Here is the call graph for this function:

◆ in_context()

logical function, public vac_vars::in_context ( integer, intent(in)  ctxt)

Indicates whether current process is in the context.

Parameters
[in]ctxtcontext for vector

Definition at line 378 of file vac_vars.f90.

+ Here is the caller graph for this function:

◆ init_vac()

integer function vac_vars::init_vac ( class(vac_type), intent(inout)  vac,
integer, intent(in)  style,
integer, intent(in)  n_bnd,
integer, intent(in)  prim_X,
integer, dimension(2), intent(in)  n_ang,
real(dp), intent(in)  jq 
)

Initializes a vacuum type.

The number of modes as well as n and m are also set up.

The variables G and H are saved in a special format, based on the block-cyclical distribution employed in scalapack. As a hypothetical example, consider a process grid corresponding to block-size 1x2 and 2x3 processes with a total size of 3x15:

\[\left[\begin{array}{ccccccccccccccc} 0 & 0 & 1 & 1 & 2 & 2 & 0 & 0 & 1 & 1 & 2 & 2 & 0 & 0 & 1 \\ 3 & 3 & 4 & 4 & 5 & 5 & 3 & 3 & 4 & 4 & 5 & 5 & 3 & 3 & 4 \\ 0 & 0 & 1 & 1 & 2 & 2 & 0 & 0 & 1 & 1 & 2 & 2 & 0 & 0 & 1 \end{array}\right]\]

Therefore, the 3-D storage convention used is, for example, for process 1:

\[\begin{bmatrix} (1,3) & (1,4) & (1,9) & (1,10) & (1,15) & (1,\cdot) \\ (3,3) & (3,4) & (3,9) & (3,10) & (3,15) & (3,\cdot) \end{bmatrix}\]

The information concerning the delimitations of the individual subintervals in the horizontal and vertical direction can be saved once per subinterval. For process 4 of above example, this would be

\[ \begin{bmatrix} 2 \\ 2 \end{bmatrix} ; \]

for the vertical direction, and

\[ \begin{bmatrix} 3 & 9 & 15 \\ 4 & 10 & 15 \end{bmatrix} ; \]

for the horizontal direction.

A value \(\cdot\) indicates that the index is out of global bounds. Practically, this is checked by seeing whether the total index does not exceed the global bounds.

Returns
ierr
Parameters
[in,out]vacvacuum variables
[in]stylestyle of vacuum (1: field-line 3-D, 2: axisymmetric)
[in]n_bndtotal number of points in boundary
[in]prim_xprimary mode number
[in]n_angnumber of angles (1) and number of field lines (2)
[in]jqiota (tor. flux) or q (pol. flux) at edge

Definition at line 121 of file vac_vars.f90.

+ Here is the call graph for this function:

◆ set_loc_lims()

subroutine, public vac_vars::set_loc_lims ( integer, intent(in)  n_loc,
integer, intent(in)  bs,
integer, intent(in)  ind_p,
integer, intent(in)  n_p,
integer, dimension(:,:), intent(inout), allocatable  lims 
)

Calculates the limits in local index.

See also
See init_var() for an explanation.
Parameters
[in]n_locnumber of points owned by local process
[in]bsblock size
[in]ind_pindex of current process in this dimension
[in]n_pnumber of processes in this dimension
[in,out]limslimits for different subregions in this dimension

Definition at line 261 of file vac_vars.f90.

+ Here is the caller graph for this function:

Variable Documentation

◆ n_alloc_vacs

integer, public vac_vars::n_alloc_vacs

nr. of allocated vacs

Note
Debug version only

Definition at line 23 of file vac_vars.f90.