PB3D  [2.45]
Ideal linear high-n MHD stability in 3-D
Interfaces and Types | Functions/Subroutines | Variables
eq_utilities Module Reference

Numerical utilities related to equilibrium variables. More...

Interfaces and Types

interface  calc_f_derivs
 Transforms derivatives of the equilibrium quantities in E coordinates to derivatives in the F coordinates. More...
 
interface  calc_inv_met
 Calculate \(D_1^{m_1} D_2^{m_2} D_3^{m_3} X\) from \(D_1^{i_1} D_2^{i_2} D_3^{i_3} X\) and \(D_1^{j_1} D_2^{j_2} D_3^{j_3} Y\) where \(XY=1\) and \(i,j = 0\ldots m\), according to [17]. More...
 
interface  transf_deriv
 Calculates derivatives in a coordinate system B from derivatives in a coordinates system A, making use of the transformation matrix \(\overline{\text{T}}_\text{B}^\text{A}\). More...
 

Functions/Subroutines

integer function, public calc_g (g_A, T_BA, g_B, deriv, max_deriv)
 Calculate the metric coefficients in a coordinate system B ! using the. More...
 
integer function, public calc_memory_eq (arr_size, n_par, mem_size)
 Calculate memory in MB necessary for variables in equilibrium job. More...
 
logical function, public do_eq ()
 If this equilibrium job should be done, also increment eq_job_nr. More...
 
elemental character(len=max_str_ln) function, public eq_info ()
 Returns string with possible extension with equilibrium job as well as parallel job, or nothing if only one level and one parallel job. More...
 
subroutine, public print_info_eq (n_par_X_rich)
 Prints information for equilibrium parallel job. More...
 

Variables

logical, public debug_calc_inv_met_ind = .false.
 plot debug information for calc_inv_met_ind() More...
 

Detailed Description

Numerical utilities related to equilibrium variables.

Function/Subroutine Documentation

◆ calc_g()

integer function, public eq_utilities::calc_g ( real(dp), dimension(:,:,:,:,0:,0:,0:), intent(in)  g_A,
real(dp), dimension(:,:,:,:,0:,0:,0:), intent(in)  T_BA,
real(dp), dimension(:,:,:,:,0:,0:,0:), intent(inout)  g_B,
integer, dimension(3), intent(in)  deriv,
integer, intent(in)  max_deriv 
)

Calculate the metric coefficients in a coordinate system B ! using the.

Parameters
[in]g_a\(g_\text{A}\)
[in]t_ba\(\overline{\text{T}}_\text{B}^\text{A}\)
[in,out]g_b\(g_\text{B}\)
[in]derivderivatives
[in]max_derivmaximum derivative

Definition at line 387 of file eq_utilities.f90.

+ Here is the caller graph for this function:

◆ calc_memory_eq()

integer function, public eq_utilities::calc_memory_eq ( integer, intent(in)  arr_size,
integer, intent(in)  n_par,
real(dp), intent(inout)  mem_size 
)

Calculate memory in MB necessary for variables in equilibrium job.

The size of these variables is equal to the product of the non-parallel dimensions (e.g. n_geo x loc_n_r), times the number of variables.

The latter should be:

  • PB3D: only take into account ( \(2\cdot6+1 = 13\)) equilibrium variables g_FD, h_FD and jac_FD, as the perturbation variables are divided in jobs occupying the remaning space. These equilibrium variables are tabulated on the equilibrium grid. Note that they contain derivatives in extra dimensions, so that their size should be multiplied by (max_deriv+1)^3.
  • POST: take into account these 13 equilibrium variables, as well as 4 variables U and DU, with double size due to being complex, and the additional dimension equal to n_mod_X, but without derivatives.
Returns
ierr
Parameters
[in]arr_sizesize of part of X array
[in]n_parnumber of parallel points
[in,out]mem_sizetotal size

Definition at line 907 of file eq_utilities.f90.

+ Here is the caller graph for this function:

◆ do_eq()

logical function, public eq_utilities::do_eq

If this equilibrium job should be done, also increment eq_job_nr.

Definition at line 949 of file eq_utilities.f90.

+ Here is the caller graph for this function:

◆ eq_info()

elemental character(len=max_str_ln) function, public eq_utilities::eq_info

Returns string with possible extension with equilibrium job as well as parallel job, or nothing if only one level and one parallel job.

Definition at line 974 of file eq_utilities.f90.

+ Here is the caller graph for this function:

◆ print_info_eq()

subroutine, public eq_utilities::print_info_eq ( integer, intent(in)  n_par_X_rich)

Prints information for equilibrium parallel job.

Parameters
[in]n_par_x_richnumber of parallel points in this Richardson level

Definition at line 986 of file eq_utilities.f90.

+ Here is the caller graph for this function:

Variable Documentation

◆ debug_calc_inv_met_ind

logical, public eq_utilities::debug_calc_inv_met_ind = .false.

plot debug information for calc_inv_met_ind()

Note
Debug version only

Definition at line 27 of file eq_utilities.f90.