newton_root_polish Interface

public interface newton_root_polish

"Polish" a root using Newton Raphson. This routine will perform a Newton iteration and update the roots only if they improve, otherwise, they are left as is.

Calls

interface~~newton_root_polish~~CallsGraph interface~newton_root_polish polyroots_module::newton_root_polish proc~newton_root_polish_complex polyroots_module::newton_root_polish_complex interface~newton_root_polish->proc~newton_root_polish_complex proc~newton_root_polish_real polyroots_module::newton_root_polish_real interface~newton_root_polish->proc~newton_root_polish_real

Module Procedures

private subroutine newton_root_polish_real(n, p, zr, zi, ftol, ztol, maxiter, istat)

"Polish" a root using a complex Newton Raphson method. This routine will perform a Newton iteration and update the roots only if they improve, otherwise, they are left as is.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

degree of polynomial

real(kind=wp), intent(in), dimension(n+1) :: p

vector of coefficients in order of decreasing powers

real(kind=wp), intent(inout) :: zr

real part of the zero

real(kind=wp), intent(inout) :: zi

imaginary part of the zero

real(kind=wp), intent(in) :: ftol

convergence tolerance for the root

real(kind=wp), intent(in) :: ztol

convergence tolerance for x

integer, intent(in) :: maxiter

maximum number of iterations

integer, intent(out) :: istat

status flag:

Read more…

private subroutine newton_root_polish_complex(n, p, zr, zi, ftol, ztol, maxiter, istat)

"Polish" a root using a complex Newton Raphson method. This routine will perform a Newton iteration and update the roots only if they improve, otherwise, they are left as is.

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

degree of polynomial

complex(kind=wp), intent(in), dimension(n+1) :: p

vector of coefficients in order of decreasing powers

real(kind=wp), intent(inout) :: zr

real part of the zero

real(kind=wp), intent(inout) :: zi

imaginary part of the zero

real(kind=wp), intent(in) :: ftol

convergence tolerance for the root

real(kind=wp), intent(in) :: ztol

convergence tolerance for x

integer, intent(in) :: maxiter

maximum number of iterations

integer, intent(out) :: istat

status flag:

Read more…