PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Functions/Subroutines
pb3d_ops Module Reference

Operations on PB3D output. More...

Functions/Subroutines

integer function, public reconstruct_pb3d_in (data_name)
 Reconstructs the input variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_grid (grid, data_name, rich_lvl, tot_rich, lim_pos, grid_limits)
 Reconstructs grid variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_eq_1 (grid_eq, eq, data_name, lim_pos)
 Reconstructs the equilibrium variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_eq_2 (grid_eq, eq, data_name, rich_lvl, tot_rich, lim_pos)
 Reconstructs the equilibrium variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_x_1 (mds, grid_X, X, data_name, rich_lvl, tot_rich, lim_sec_X, lim_pos)
 Reconstructs the vectorial perturbation variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_x_2 (mds, grid_X, X, data_name, rich_lvl, tot_rich, lim_sec_X, lim_pos, is_field_averaged)
 Reconstructs the tensorial perturbation variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_vac (vac, data_name, rich_lvl)
 Reconstructs the vacuum variables from PB3D HDF5 output. More...
 
integer function, public reconstruct_pb3d_sol (mds, grid_sol, sol, data_name, rich_lvl, lim_sec_sol, lim_pos)
 Reconstructs the solution variables from PB3D HDF5 output. More...
 
integer function, public get_pb3d_grid_size (n, grid_name, rich_lvl, tot_rich)
 get grid size More...
 

Detailed Description

Operations on PB3D output.

Note
If you have parallel jobs, if the reconstruction routines are called for multiple equilibrium jobs, this can only be done after the last equilibrium job is finished. There are no checks for this.

Function/Subroutine Documentation

◆ get_pb3d_grid_size()

integer function, public pb3d_ops::get_pb3d_grid_size ( integer, dimension(3), intent(inout)  n,
character(len=*), intent(in)  grid_name,
integer, intent(in), optional  rich_lvl,
logical, intent(in), optional  tot_rich 
)

get grid size

Note
grid_ is added in front the grid_name.
Returns
ierr
Parameters
[in,out]nn of grid
[in]grid_namename of grid
[in]rich_lvlRichardson level to reconstruct
[in]tot_richwhether to combine with previous Richardson levels

Definition at line 1454 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_eq_1()

integer function, public pb3d_ops::reconstruct_pb3d_eq_1 ( type(grid_type), intent(in)  grid_eq,
type(eq_1_type), intent(inout), optional  eq,
character(len=*), intent(in)  data_name,
integer, dimension(1,2), intent(in), optional  lim_pos 
)

Reconstructs the equilibrium variables from PB3D HDF5 output.

Furthermore, using lim_pos, you can obtain a subset of the data by directly passing its limits to the underlying HDF5 routine. This refers to the position dimensions only. If provided, the normal limits of a divided grid refer to the subset, as in copy_grid().

Returns
ierr
Parameters
[in]grid_eqequilibrium grid
[in,out]eqflux equilibrium
[in]data_namename to reconstruct
[in]lim_posposition limits of subset of data

Definition at line 597 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_eq_2()

integer function, public pb3d_ops::reconstruct_pb3d_eq_2 ( type(grid_type), intent(in)  grid_eq,
type(eq_2_type), intent(inout)  eq,
character(len=*), intent(in)  data_name,
integer, intent(in), optional  rich_lvl,
logical, intent(in), optional  tot_rich,
integer, dimension(3,2), intent(in), optional  lim_pos 
)

Reconstructs the equilibrium variables from PB3D HDF5 output.

Also, if rich_lvl is provided, _R_[rich_lvl] is appended to the data name if it is > 0.

With tot_rich the information from previous Richardson levels can be combined.

Furthermore, using lim_pos, you can obtain a subset of the data by directly passing its limits to the underlying HDF5 routine. This refers to the position dimensions only. If provided, the normal limits of a divided grid refer to the subset, as in copy_grid().

Returns
ierr
Parameters
[in]grid_eqequilibrium grid
[in,out]eqmetric equilibrium
[in]data_namename to reconstruct
[in]rich_lvlRichardson level to reconstruct
[in]tot_richwhether to combine with previous Richardson levels
[in]lim_posposition limits of subset of data

Definition at line 695 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_grid()

integer function, public pb3d_ops::reconstruct_pb3d_grid ( type(grid_type), intent(inout)  grid,
character(len=*), intent(in)  data_name,
integer, intent(in), optional  rich_lvl,
logical, intent(in), optional  tot_rich,
integer, dimension(3,2), intent(in), optional  lim_pos,
integer, dimension(2), intent(in), optional  grid_limits 
)

Reconstructs grid variables from PB3D HDF5 output.

Also, if rich_lvl is provided, _R_[rich_lvl] is appended to the data name if it is > 0.

With tot_rich the information from previous Richardson levels can be combined.

Furthermore, using lim_pos, you can obtain a subset of the data by directly passing its limits to the underlying HDF5 routine. This refers to the position dimensions only. If provided, the normal limits of a divided grid refer to the subset, as in copy_grid().

Note
  1. grid_ is added in front the data_name.
  2. By providing lim_pos equal to 0 in the angular dimensions, the angular part can be discarded when reconstructing the grid.
Returns
ierr
Parameters
[in]data_namename of grid
[in]rich_lvlRichardson level to reconstruct
[in]tot_richwhether to combine with previous Richardson levels
[in]lim_posposition limits of subset of data
[in]grid_limitsi_limit of grid

Definition at line 442 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_in()

integer function, public pb3d_ops::reconstruct_pb3d_in ( character(len=*), intent(in)  data_name)

Reconstructs the input variables from PB3D HDF5 output.

Returns
ierr
Parameters
[in]data_namename of input variables

Definition at line 41 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_sol()

integer function, public pb3d_ops::reconstruct_pb3d_sol ( type(modes_type), intent(in)  mds,
type(grid_type), intent(in)  grid_sol,
type(sol_type), intent(inout)  sol,
character(len=*), intent(in)  data_name,
integer, intent(in), optional  rich_lvl,
integer, dimension(2), intent(in), optional  lim_sec_sol,
integer, dimension(1,2), intent(in), optional  lim_pos 
)

Reconstructs the solution variables from PB3D HDF5 output.

Also, if rich_lvl is provided, _R_[rich_lvl] is appended to the data name if it is > 0.

Furthermore, using lim_pos, you can obtain a subset of the data by directly passing its limits to the underlying HDF5 routine. This refers to the position dimensions only. If provided, the normal limits of a divided grid refer to the subset, as in copy_grid().

lim_sec_sol, on the other hand, selects a range of mode numbers.

Returns
ierr
Parameters
[in]mdsgeneral modes variables
[in]grid_solsolution grid
[in,out]solsolution variables
[in]data_namename to reconstruct
[in]rich_lvlRichardson level to reconstruct
[in]lim_sec_sollimits of m_X (pol. flux) or n_X (tor. flux)
[in]lim_posposition limits of subset of data

Definition at line 1359 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_vac()

integer function, public pb3d_ops::reconstruct_pb3d_vac ( type(vac_type), intent(inout)  vac,
character(len=*), intent(in)  data_name,
integer, intent(in), optional  rich_lvl 
)

Reconstructs the vacuum variables from PB3D HDF5 output.

Also, if rich_lvl is provided, _R_[rich_lvl] is appended to the data name if it is > 0.

Returns
ierr
Parameters
[in,out]vacvacuum variables
[in]data_namename to reconstruct
[in]rich_lvlRichardson level to reconstruct

Definition at line 1228 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_x_1()

integer function, public pb3d_ops::reconstruct_pb3d_x_1 ( type(modes_type), intent(in)  mds,
type(grid_type), intent(in)  grid_X,
type(x_1_type), intent(inout)  X,
character(len=*), intent(in)  data_name,
integer, intent(in), optional  rich_lvl,
logical, intent(in), optional  tot_rich,
integer, dimension(2), intent(in), optional  lim_sec_X,
integer, dimension(3,2), intent(in), optional  lim_pos 
)

Reconstructs the vectorial perturbation variables from PB3D HDF5 output.

Also, if rich_lvl is provided, _R_[rich_lvl] is appended to the data name if it is > 0.

With tot_rich the information from previous Richardson levels can be combined.

Furthermore, using lim_pos, you can obtain a subset of the data by directly passing its limits to the underlying HDF5 routine. This refers to the position dimensions only. If provided, the normal limits of a divided grid refer to the subset, as in copy_grid().

lim_sec_X, on the other hand, selects a range of mode numbers.

Returns
ierr
Parameters
[in]mdsgeneral modes variables
[in]grid_xperturbation grid
[in,out]xvectorial perturbation variables
[in]data_namename to reconstruct
[in]rich_lvlRichardson level to reconstruct
[in]tot_richwhether to combine with previous Richardson levels
[in]lim_sec_xlimits of m_X (pol. flux) or n_X (tor. flux)
[in]lim_posposition limits of subset of data

Definition at line 833 of file PB3D_ops.f90.

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

◆ reconstruct_pb3d_x_2()

integer function, public pb3d_ops::reconstruct_pb3d_x_2 ( type(modes_type), intent(in)  mds,
type(grid_type), intent(in)  grid_X,
type(x_2_type), intent(inout)  X,
character(len=*), intent(in)  data_name,
integer, intent(in), optional  rich_lvl,
logical, intent(in), optional  tot_rich,
integer, dimension(2,2), intent(in), optional  lim_sec_X,
integer, dimension(3,2), intent(in), optional  lim_pos,
logical, intent(in), optional  is_field_averaged 
)

Reconstructs the tensorial perturbation variables from PB3D HDF5 output.

Also, if rich_lvl is provided, _R_[rich_lvl] is appended to the data name if it is > 0.

With tot_rich the information from previous Richardson levels can be combined.

Furthermore, using lim_pos, you can obtain a subset of the data by directly passing its limits to the underlying HDF5 routine. This refers to the position dimensions only. If provided, the normal limits of a divided grid refer to the subset, as in copy_grid().

lim_sec_X, on the other hand, selects a range of mode numbers.

Note
The tensorial perturbation type can also be used for field- aligned variables, in which case the first index is assumed to have dimension 1 only. This can be triggered using is_field_averaged.
Returns
ierr
Parameters
[in]mdsgeneral modes variables
[in]grid_xperturbation grid
[in,out]xtensorial perturbation vars
[in]data_namename to reconstruct
[in]rich_lvlRichardson level to reconstruct
[in]tot_richwhether to combine with previous Richardson levels
[in]lim_sec_xlimits of m_X (pol flux) or n_X (tor flux) for both dimensions
[in]lim_posposition limits of subset of data
[in]is_field_averagedif field-averaged, only one dimension for first index

Definition at line 992 of file PB3D_ops.f90.

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