PB3D
[2.45]
Ideal linear high-n MHD stability in 3-D
|
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... | |
Numerical operations.
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.
x_int_in
needs to be so that the function values at either end are of different value. [in,out] | fun | fun(x) with
|
[in,out] | zero | output |
[in] | x_int_in | interval |
Definition at line 462 of file num_ops.f90.
logical, public num_ops::debug_calc_zero = .false. |
plot debug information for calc_zero
Definition at line 22 of file num_ops.f90.