|
PB3D [2.47]
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. | |
| integer function | calc_norm_range_pb3d_in (in_limits) |
| PB3D input version. | |
| subroutine | calc_norm_range_pb3d_eq (eq_limits) |
| PB3D equilibrium version. | |
| integer function | calc_norm_range_pb3d_x (eq_limits, x_limits, r_f_eq, r_f_x, jq) |
| PB3D perturbation version. | |
| integer function | calc_norm_range_pb3d_sol (sol_limits, r_f_sol, n_procs) |
| PB3D solution version. | |
| subroutine | calc_norm_range_post (eq_limits, x_limits, sol_limits, r_f_eq, r_f_x, r_f_sol) |
| POST version. | |
| integer function, public | grid_ops::setup_grid_eq (grid_eq, eq_limits) |
| Sets up the equilibrium grid. | |
| 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. | |
| 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. | |
| 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. | |
| integer function, public | grid_ops::calc_ang_grid_eq_b (grid_eq, eq, only_half_grid) |
| Calculate equilibrium grid that follows magnetic field lines. | |
| 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. | |
| integer function, public | grid_ops::magn_grid_plot (grid) |
| Plots the grid in real 3-D space. | |
| 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. | |
Variables | |
| logical, public | grid_ops::debug_calc_ang_grid_eq_b = .false. |
| plot debug information for calc_ang_grid_eq_b() | |
| 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 245 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 135 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 386 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 283 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 451 of file grid_ops.f90.