PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
Go to the source code of this file.
Modules | |
module | grid_ops |
Operations that have to do with the grids and different coordinate systems. | |
Functions/Subroutines | |
integer function, public | grid_ops::calc_norm_range (style, in_limits, eq_limits, X_limits, sol_limits, r_F_eq, r_F_X, r_F_sol, jq) |
Calculates normal range for the input grid, the equilibrium grid and/or the solution grid. More... | |
integer function | calc_norm_range_pb3d_in (in_limits) |
PB3D input version. More... | |
subroutine | calc_norm_range_pb3d_eq (eq_limits) |
PB3D equilibrium version. More... | |
integer function | calc_norm_range_pb3d_x (eq_limits, X_limits, r_F_eq, r_F_X, jq) |
PB3D perturbation version. More... | |
integer function | calc_norm_range_pb3d_sol (sol_limits, r_F_sol, n_procs) |
PB3D solution version. More... | |
subroutine | calc_norm_range_post (eq_limits, X_limits, sol_limits, r_F_eq, r_F_X, r_F_sol) |
POST version. More... | |
integer function, public | grid_ops::setup_grid_eq (grid_eq, eq_limits) |
Sets up the equilibrium grid. More... | |
integer function, public | grid_ops::setup_grid_eq_b (grid_eq, grid_eq_B, eq, only_half_grid) |
Sets up the field-aligned equilibrium grid. More... | |
integer function, public | grid_ops::setup_grid_x (grid_eq, grid_X, r_F_X, X_limits) |
Sets up the general perturbation grid, in which the perturbation variables are calculated. More... | |
integer function, public | grid_ops::setup_grid_sol (grid_eq, grid_X, grid_sol, r_F_sol, sol_limits) |
Sets up the general solution grid, in which the solution variables are calculated. More... | |
integer function, public | grid_ops::calc_ang_grid_eq_b (grid_eq, eq, only_half_grid) |
Calculate equilibrium grid that follows magnetic field lines. More... | |
integer function, public | grid_ops::redistribute_output_grid (grid, grid_out, no_outer_trim) |
Redistribute a grid to match the normal distribution of solution grid. More... | |
integer function, public | grid_ops::magn_grid_plot (grid) |
Plots the grid in real 3-D space. More... | |
integer function, public | grid_ops::print_output_grid (grid, grid_name, data_name, rich_lvl, par_div, remove_previous_arrs) |
Print grid variables to an output file. More... | |
Variables | |
logical, public | grid_ops::debug_calc_ang_grid_eq_b = .false. |
plot debug information for calc_ang_grid_eq_b() More... | |
subroutine calc_norm_range::calc_norm_range_pb3d_eq | ( | integer, dimension(2), intent(inout) | eq_limits | ) |
PB3D equilibrium version.
The normal range is calculated by dividing the full equilibrium range passed from the input phase between the processes.
[in,out] | eq_limits | min. and max. index of eq. grid for this process |
Definition at line 246 of file grid_ops.f90.
integer function calc_norm_range::calc_norm_range_pb3d_in | ( | integer, dimension(2), intent(inout) | in_limits | ) |
PB3D input version.
The normal range is calculated by finding the tightest range of the input variables encompassing the entire solution range. Additionally, the global max_flux variables are set as well..
[in,out] | in_limits | total min. and max. index of eq. grid for this process |
Definition at line 137 of file grid_ops.f90.
integer function calc_norm_range::calc_norm_range_pb3d_sol | ( | integer, dimension(2), intent(inout) | sol_limits, |
real(dp), dimension(:), intent(inout) | r_F_sol, | ||
integer, intent(in), optional | n_procs | ||
) |
PB3D solution version.
The normal range is determined by simply dividing the solution range, a ghost range is required.
By default, this routine uses sol_n_procs
processes, but this can be overruled.
[in,out] | sol_limits | min. and max. index of sol grid for this process |
[in,out] | r_f_sol | solution r_F |
[in] | n_procs | how many processes used |
Definition at line 388 of file grid_ops.f90.
integer function calc_norm_range::calc_norm_range_pb3d_x | ( | integer, dimension(2), intent(in) | eq_limits, |
integer, dimension(2), intent(inout) | X_limits, | ||
real(dp), dimension(:), intent(in) | r_F_eq, | ||
real(dp), dimension(:), intent(inout), allocatable | r_F_X, | ||
real(dp), dimension(:), intent(in) | jq | ||
) |
PB3D perturbation version.
The normal range is determined according to X_grid style:
prim_X
. [in] | eq_limits | min. and max. index of eq grid for this process |
[in,out] | x_limits | min. and max. index of X grid for this process |
[in] | r_f_eq | equilibrium r_F |
[in,out] | r_f_x | perturbation r_F |
[in] | jq | q_saf (pol. flux) or rot_t (tor. flux) in total Flux variables |
Definition at line 285 of file grid_ops.f90.
subroutine calc_norm_range::calc_norm_range_post | ( | integer, dimension(2), intent(inout) | eq_limits, |
integer, dimension(2), intent(inout) | X_limits, | ||
integer, dimension(2), intent(inout) | sol_limits, | ||
real(dp), dimension(:), intent(in) | r_F_eq, | ||
real(dp), dimension(:), intent(in) | r_F_X, | ||
real(dp), dimension(:), intent(in) | r_F_sol | ||
) |
POST version.
The normal range is determined by simply dividing a possible subset of the solution range, indicated by min_r_plot
and max_r_sol
, including a ghost range and getting a bounding equilibrium and perturbation range.
[in,out] | eq_limits | min. and max. index of eq grid for this process |
[in,out] | x_limits | min. and max. index of X grid for this process |
[in,out] | sol_limits | min. and max. index of sol grid for this process |
[in] | r_f_eq | eq r_F |
[in] | r_f_x | X r_F |
[in] | r_f_sol | sol r_F |
Definition at line 453 of file grid_ops.f90.