PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
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... | |
Variables pertaining to the vacuum quantities.
integer function, public vac_vars::copy_vac | ( | class(vac_type), intent(in) | vac, |
class(vac_type), intent(inout) | vac_copy | ||
) |
Copy a vacuum type.
[in] | vac | vac to be copied |
[in,out] | vac_copy | copy |
Definition at line 339 of file vac_vars.f90.
subroutine vac_vars::dealloc_vac | ( | class(vac_type), intent(inout) | vac | ) |
Deallocates vacuum variables.
[in,out] | vac | vacuum variables to be deallocated |
Definition at line 287 of file vac_vars.f90.
logical function, public vac_vars::in_context | ( | integer, intent(in) | ctxt | ) |
Indicates whether current process is in the context.
[in] | ctxt | context for vector |
Definition at line 378 of file vac_vars.f90.
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.
[in,out] | vac | vacuum variables |
[in] | style | style of vacuum (1: field-line 3-D, 2: axisymmetric) |
[in] | n_bnd | total number of points in boundary |
[in] | prim_x | primary mode number |
[in] | n_ang | number of angles (1) and number of field lines (2) |
[in] | jq | iota (tor. flux) or q (pol. flux) at edge |
Definition at line 121 of file vac_vars.f90.
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.
[in] | n_loc | number of points owned by local process |
[in] | bs | block size |
[in] | ind_p | index of current process in this dimension |
[in] | n_p | number of processes in this dimension |
[in,out] | lims | limits for different subregions in this dimension |
Definition at line 261 of file vac_vars.f90.
integer, public vac_vars::n_alloc_vacs |