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

Driver of the perturbation part of PB3D. More...

Functions/Subroutines

integer function, public run_driver_x (grid_eq, grid_eq_B, grid_X, grid_X_B, eq_1, eq_2, X_1, X_2)
 Main driver of PB3D perturbation part. More...
 
integer function run_driver_x_0 (grid_eq, grid_eq_B, grid_X, grid_X_B, eq_1, eq_2, eq_2_B)
 part 0 of driver_x: perturbation grid as well as reconstruction of variables. More...
 
integer function run_driver_x_1 (grid_eq, grid_X, eq_1, eq_2, X_1)
 Part 1 of driver_x: Vectorial jobs. More...
 
integer function run_driver_x_2 (grid_eq_B, grid_X, grid_X_B, eq_1, eq_2_B, X_1, X_2_int)
 Part 2 of driver_X: Tensorial jobs. More...
 
subroutine print_info_x_2 ()
 Prints information for tensorial perturbation job. More...
 

Detailed Description

Driver of the perturbation part of PB3D.

Function/Subroutine Documentation

◆ print_info_x_2()

subroutine driver_x::print_info_x_2

Prints information for tensorial perturbation job.

Definition at line 699 of file driver_X.f90.

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

◆ run_driver_x()

integer function, public driver_x::run_driver_x ( type(grid_type), intent(in), target  grid_eq,
type(grid_type), intent(in), pointer  grid_eq_B,
type(grid_type), intent(inout), target  grid_X,
type(grid_type), intent(inout), pointer  grid_X_B,
type(eq_1_type), intent(in), target  eq_1,
type(eq_2_type), intent(inout), target  eq_2,
type(x_1_type), intent(inout)  X_1,
type(x_2_type), intent(inout)  X_2 
)

Main driver of PB3D perturbation part.

  • sets up:
    • [0] grid_X (for HELENA, only first Richardson level)
    • [0] grid_X_B (for VMEC, equal to grid_X_out)
    • [1] X_1
    • [2] X_2
  • writes to HDF5:
    • [0] grid_X (for HELENA, only first Richardson level)
    • [0] grid_X_B (for VMEC, equal to grid_X)
    • [1] X_1 (only for HELENA, only first Richardson level)
    • [2] X_2
  • deallocates:
    • X_1 before setting up
    • grid_X before setting up
    • grid_X_B before setting up

([x] indicates driver x)

Note
eq_2 needs to be intent(inout) because interp_HEL_on_grid() requires this for generality. The variable is not modified in this driver, though.
Returns
ierr
Parameters
[in]grid_eqequilibrium grid (should be in but needs inout for interp_HEL_on_grid)
[in]grid_eq_bfield-aligned equilibrium grid (should be in but needs inout for interp_HEL_on_grid)
[in,out]grid_xperturbation grid
[in,out]grid_x_bfield-aligned perturbation grid
[in]eq_1flux equilibrium variables
[in,out]eq_2metric equilibrium variables (should be in but needs inout for interp_HEL_on_grid)
[in,out]x_1vectorial perturbation variables
[in,out]x_2tensorial perturbation variables

Definition at line 59 of file driver_X.f90.

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

◆ run_driver_x_0()

integer function driver_x::run_driver_x_0 ( type(grid_type), intent(in), target  grid_eq,
type(grid_type), intent(in), pointer  grid_eq_B,
type(grid_type), intent(inout), target  grid_X,
type(grid_type), intent(inout), pointer  grid_X_B,
type(eq_1_type), intent(in)  eq_1,
type(eq_2_type), intent(inout), target  eq_2,
type(eq_2_type), intent(inout), pointer  eq_2_B 
)

part 0 of driver_x: perturbation grid as well as reconstruction of variables.

Parameters
[in]grid_eqequilibrium grid
[in]grid_eq_bfield-aligned equilibrium grid
[in,out]grid_xperturbation grid
[in,out]grid_x_bfield-aligned perturbation grid
[in]eq_1flux equilibrium variables
[in,out]eq_2metric equilibrium variables
[in,out]eq_2_bfield-aligned metric equilibrium variables

Definition at line 267 of file driver_X.f90.

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

◆ run_driver_x_1()

integer function driver_x::run_driver_x_1 ( type(grid_type), intent(in)  grid_eq,
type(grid_type), intent(in)  grid_X,
type(eq_1_type), intent(in)  eq_1,
type(eq_2_type), intent(in)  eq_2,
type(x_1_type), intent(inout)  X_1 
)

Part 1 of driver_x: Vectorial jobs.

Note
Everything is done here in the original grids, not necessarily field-aligned.
Returns
ierr
Parameters
[in]grid_eqequilibrium grid
[in]grid_xperturbation grid
[in]eq_1flux equilibrium variables
[in]eq_2metric equilibrium variables
[in,out]x_1vectorial X variables

Definition at line 376 of file driver_X.f90.

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

◆ run_driver_x_2()

integer function driver_x::run_driver_x_2 ( type(grid_type), intent(in), pointer  grid_eq_B,
type(grid_type), intent(in), target  grid_X,
type(grid_type), intent(in), pointer  grid_X_B,
type(eq_1_type), intent(in)  eq_1,
type(eq_2_type), intent(in), pointer  eq_2_B,
type(x_1_type), intent(in)  X_1,
type(x_2_type), intent(inout)  X_2_int 
)

Part 2 of driver_X: Tensorial jobs.

Note
Everything is done in the field-aligned grids, where HELENA vectorial perturbation variables are first interpolated.
Returns
ierr
Parameters
[in]grid_eq_bfield-aligned equilibrium grid
[in]grid_xperturbation grid
[in]grid_x_bfield-aligned perturbation grid
[in]eq_1flux equilibrium variables
[in]eq_2_bfield-aligned metric equilibrium variables
[in]x_1vectorial X variables
[in,out]x_2_inttensorial X variables

Definition at line 526 of file driver_X.f90.

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