PB3D [2.47]
Ideal linear high-n MHD stability in 3-D
Loading...
Searching...
No Matches
rich_vars.f90
Go to the documentation of this file.
1!------------------------------------------------------------------------------!
2!> Variables concerning Richardson extrapolation.
3!------------------------------------------------------------------------------!
5#include <PB3D_macros.h>
7 use output_ops
8 use messages
10
11 implicit none
12 private
13 public rich_info, &
17
18 ! global variables
19 integer :: rich_lvl !< current level of Richardson extrapolation
20 integer :: n_par_x !< nr. of parallel points in field-aligned grid
21 integer, parameter :: req_min_n_par_x = 20 !< required minimum \c n_par_X
22 integer :: min_n_par_x !< min. of \c n_par_X (e.g. first value in Richardson loop)
23 logical :: use_guess !< whether a guess is formed from previous level of Richardson
24 logical :: no_guess !< disable guessing Eigenfunction from previous level of Richardson
25 logical :: rich_conv !< if Richarson extrapolation has converged
26 complex(dp), allocatable :: sol_val_rich(:,:,:) !< Richardson array of eigenvalues
27 real(dp), allocatable :: x_axis_rich(:,:) !< x axis for plot of Eigenvalues with Richardson level
28 real(dp), allocatable :: max_rel_err(:) !< maximum relative error for all Richardson levels
29 integer, allocatable :: loc_max_rel_err(:,:) !< location of maximum of relative error
30
31contains
32 !> Returns string with possible extension with Richardson level or nothing
33 !! if only one level and one parallel job.
34 elemental character(len=max_str_ln) function rich_info()
35 if (max_it_rich.gt.1) then
36 rich_info = ' for Richardson level '//trim(i2str(rich_lvl))
37 else
38 rich_info = ''
39 end if
40 end function rich_info
41end module rich_vars
Numerical utilities related to giving output.
Definition messages.f90:4
Numerical variables used by most other modules.
Definition num_vars.f90:4
integer, parameter, public dp
double precision
Definition num_vars.f90:46
real(dp), parameter, public pi
Definition num_vars.f90:83
integer, parameter, public max_str_ln
maximum length of strings
Definition num_vars.f90:50
real(dp), public tol_rich
tolerance for Richardson extrapolation
Definition num_vars.f90:128
integer, public max_it_rich
number of levels for Richardson extrapolation
Definition num_vars.f90:127
Operations concerning giving output, on the screen as well as in output files.
Definition output_ops.f90:5
Variables concerning Richardson extrapolation.
Definition rich_vars.f90:4
integer, public min_n_par_x
min. of n_par_X (e.g. first value in Richardson loop)
Definition rich_vars.f90:22
logical, public no_guess
disable guessing Eigenfunction from previous level of Richardson
Definition rich_vars.f90:24
integer, public rich_lvl
current level of Richardson extrapolation
Definition rich_vars.f90:19
elemental character(len=max_str_ln) function, public rich_info()
Returns string with possible extension with Richardson level or nothing if only one level and one par...
Definition rich_vars.f90:35
integer, public n_par_x
nr. of parallel points in field-aligned grid
Definition rich_vars.f90:20
real(dp), dimension(:,:), allocatable, public x_axis_rich
x axis for plot of Eigenvalues with Richardson level
Definition rich_vars.f90:27
integer, parameter, public req_min_n_par_x
required minimum n_par_X
Definition rich_vars.f90:21
logical, public rich_conv
if Richarson extrapolation has converged
Definition rich_vars.f90:25
complex(dp), dimension(:,:,:), allocatable, public sol_val_rich
Richardson array of eigenvalues.
Definition rich_vars.f90:26
logical, public use_guess
whether a guess is formed from previous level of Richardson
Definition rich_vars.f90:23
integer, dimension(:,:), allocatable, public loc_max_rel_err
location of maximum of relative error
Definition rich_vars.f90:29
real(dp), dimension(:), allocatable, public max_rel_err
maximum relative error for all Richardson levels
Definition rich_vars.f90:28
Operations on strings.
elemental character(len=max_str_ln) function, public i2str(k)
Convert an integer to string.