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

Operations concerning Richardson extrapolation. More...

Functions/Subroutines

integer function, public init_rich ()
 Initialize Richardson extrapolation system. More...
 
subroutine, public term_rich ()
 Terminate the Richardson extrapolation system. More...
 
logical function, public do_rich ()
 Tests whether this Richardson level should be done. More...
 
integer function, public start_rich_lvl ()
 Start a Richardson level. More...
 
subroutine, public stop_rich_lvl ()
 Stop a Richardson level. More...
 
subroutine, public calc_rich_ex (sol_val)
 Calculates the coefficients of the Eigenvalues in the Richardson extrapolation. More...
 
subroutine check_conv ()
 Decides whether convergence has been reached for the Richardson extrapolation. More...
 
integer function, public find_max_rich_lvl (lvl_rich_req, max_lvl_rich_file)
 Probe to find out which Richardson levels are available. More...
 

Detailed Description

Operations concerning Richardson extrapolation.

Function/Subroutine Documentation

◆ calc_rich_ex()

subroutine, public rich_ops::calc_rich_ex ( complex(dp), dimension(:), intent(in)  sol_val)

Calculates the coefficients of the Eigenvalues in the Richardson extrapolation.

This is done using the recursive formula:

\[ s(l,i,:) = s(l,i-1,:) + \frac{1}{2^{2 \ p \ i} - 1} (s(l,i-1,:) - s(l-1,i-1,:)), \]

where \(s\) = sol_val_rich, \(i\) = ir, \(l\) = lvl and \(p\) = norm_disc_prec_sol, the order of the numerical discretization. as described in [4], algorithm 3.2, p. 306.

Parameters
[in]sol_valEV for this Richardson level

Definition at line 459 of file rich_ops.f90.

+ Here is the caller graph for this function:

◆ check_conv()

subroutine rich_ops::check_conv

Decides whether convergence has been reached for the Richardson extrapolation.

This is done by checking whether the difference between the approximation of the Eigenvalues in this Richardson level and the previous Richardson level, with the same order of the error, falls below a threshold.

Also increases the next tol_SLEPC if it is too low.

See also
calc_rich_ex()

Definition at line 489 of file rich_ops.f90.

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

◆ do_rich()

logical function, public rich_ops::do_rich

Tests whether this Richardson level should be done.

Definition at line 313 of file rich_ops.f90.

+ Here is the caller graph for this function:

◆ find_max_rich_lvl()

integer function, public rich_ops::find_max_rich_lvl ( integer, intent(inout)  lvl_rich_req,
integer, intent(inout)  max_lvl_rich_file 
)

Probe to find out which Richardson levels are available.

Returns
ierr
Parameters
[in,out]lvl_rich_reqrequested Richardson level
[in,out]max_lvl_rich_filemax. Richardson level found in file

Definition at line 539 of file rich_ops.f90.

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

◆ init_rich()

integer function, public rich_ops::init_rich

Initialize Richardson extrapolation system.

Needs to be called only once.

Returns
ierr

Definition at line 28 of file rich_ops.f90.

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

◆ start_rich_lvl()

integer function, public rich_ops::start_rich_lvl

Start a Richardson level.

Calculates n_par_X for this level. Then uses this to divide the jobs. equilibrium Finally, the limits are set up for these jobs.

Returns
ierr

Definition at line 327 of file rich_ops.f90.

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

◆ stop_rich_lvl()

subroutine, public rich_ops::stop_rich_lvl

Stop a Richardson level.

It decides whether convergence has been reached, and possibly sets a guess for the next level.

Definition at line 405 of file rich_ops.f90.

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

◆ term_rich()

subroutine, public rich_ops::term_rich

Terminate the Richardson extrapolation system.

Needs to be called only once.

Definition at line 220 of file rich_ops.f90.

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