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

Numerical operations. More...

Interfaces and Types

interface  calc_zero_hh
 Finds the zero of a function using Householder iteration. More...
 

Functions/Subroutines

character(len=max_str_ln) function, public calc_zero_zhang (zero, fun, x_int_in)
 Finds the zero of a function using Zhang's method, which is simpler than Brent's method. More...
 

Variables

logical, public debug_calc_zero = .false.
 plot debug information for calc_zero More...
 

Detailed Description

Numerical operations.

Function/Subroutine Documentation

◆ calc_zero_zhang()

character(len=max_str_ln) function, public num_ops::calc_zero_zhang ( real(dp), intent(inout)  zero,
  fun,
real(dp), dimension(2), intent(in)  x_int_in 
)

Finds the zero of a function using Zhang's method, which is simpler than Brent's method.

Taken from from Steven Stage's correction of Zhang's paper [19].

Unlike Householder, Zhang's method needs an interval x_int_in to work in, not a guess. Also, it does not require the derivative of the function.

The routine returns an error message if no zero is found, and which is empty otherwise.

Note
The interval x_int_in needs to be so that the function values at either end are of different value.
Parameters
[in,out]funfun(x) with
  • x abscissa
  • fun ordinate
[in,out]zerooutput
[in]x_int_ininterval
Returns
possible error message

Definition at line 462 of file num_ops.f90.

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

Variable Documentation

◆ debug_calc_zero

logical, public num_ops::debug_calc_zero = .false.

plot debug information for calc_zero

Note
Debug version only

Definition at line 22 of file num_ops.f90.