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

Driver of the solution part of PB3D. More...

Functions/Subroutines

integer function, public run_driver_sol (grid_eq, grid_X, grid_sol, X, vac, sol)
 Main driver of PB3D solution part. More...
 
integer function interp_v (mds_i, grid_i, X_i, mds_o, grid_o, X_o)
 Interpolate tensorial perturbation quantities in the third dimension. More...
 

Detailed Description

Driver of the solution part of PB3D.

Function/Subroutine Documentation

◆ interp_v()

integer function driver_sol::interp_v ( type(modes_type), intent(in), target  mds_i,
type(grid_type), intent(in)  grid_i,
type(x_2_type), intent(in), target  X_i,
type(modes_type), intent(in), target  mds_o,
type(grid_type), intent(in)  grid_o,
type(x_2_type), intent(inout), target  X_o 
)

Interpolate tensorial perturbation quantities in the third dimension.

The input grid should not be divided, though the output grid can be.

The procedure considers all possible mode number combinations. For X_style 2 (fast), each secondary mode only lives in a certain normal range of the plasma. Therefore, each secondary mode pair also has a limited normal range, given by the overlap of the ranges of the members.

The interpolated mode number combinations have a normal range that might slightly differ from the input ranges, in which case extrapolation can be done if the method allows for it.

Note
If the input grid is too coarse, but the interpolated grid is not, it is in theory possible that there are mode numbers and therefore mode number pairs that exist in the input grid, though they do so in the interpolated grid. In this case, they can not be calculated and are currently set to zero. However, the current implementation of setup_modes() produces an error if less than the full range of mode numbers is accurately present.
Parameters
[in]mds_igeneral modes variables for input
[in]grid_igrid at which X_i is tabulated
[in]x_itensorial perturbation variable on input grid
[in]mds_ogeneral modes variables for output
[in]grid_ogrid at which X_o is interpolated
[in,out]x_ointerpolated tensorial perturbation variable

Definition at line 284 of file driver_sol.f90.

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

◆ run_driver_sol()

integer function, public driver_sol::run_driver_sol ( type(grid_type), intent(in)  grid_eq,
type(grid_type), intent(in), target  grid_X,
type(grid_type), intent(inout)  grid_sol,
type(x_2_type), intent(in)  X,
type(vac_type), intent(inout)  vac,
type(sol_type), intent(inout)  sol 
)

Main driver of PB3D solution part.

  • sets up:
    • grid_sol (only first Richardson level)
    • sol
  • writes to HDF5:
    • grid_sol (only first Richardson level)
    • sol
  • deallocates:
    • sol before setting up (but after guess)
Returns
ierr
Parameters
[in]grid_eqequilibrium grid
[in]grid_xperturbation grid
[in,out]grid_solsolution grid
[in]xintegrated tensorial perturbation variables
[in,out]vacvacuum variables
[in,out]solsolution variables

Definition at line 43 of file driver_sol.f90.

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