Choral
Data Types | Functions/Subroutines
newton_mod Module Reference

NEWTON NON LINEAR SOLVER. More...

Data Types

interface  newton
 
interface  solve
 

Functions/Subroutines

type(newton) function newton_create (tol, itmax, eps, verb)
 constructor More...
 
subroutine newton_solve (x, n, F)
 Newton algorithm to solve F(x) = 0. More...
 
real(rp) function residual (Fx, x)
 Residual. More...
 

Detailed Description

NEWTON NON LINEAR SOLVER.

Function/Subroutine Documentation

◆ newton_create()

type(newton) function newton_mod::newton_create ( real(rp), intent(in), optional  tol,
integer, intent(in), optional  itmax,
real(rp), intent(in), optional  eps,
integer, intent(in), optional  verb 
)
private

constructor

Definition at line 54 of file newton_mod.f90.

Here is the call graph for this function:

◆ newton_solve()

subroutine newton_mod::newton_solve ( real(rp), dimension(:), intent(inout)  x,
type(newton), intent(inout)  n,
procedure(rntorn)  F 
)
private

Newton algorithm to solve F(x) = 0.

Approximate conputation of the Jacobian

Krylov iterative solver to solve DF(x)^{-1}.b = GMRes

x = initial guess = numerical solution at algorithm's end

neps = parameter to evaluate DF(x).y :

   DF(x).y \simeq (F(x + epsilon*y - F(x)))/epsilon

stopping criteria = residual < tol with residual = |F(x)|_2/|x|_2

returns : x = numerical solution iter = number of performed iterations res = residual Feval = number of performed operation z–>F(z)

Definition at line 92 of file newton_mod.f90.

Here is the call graph for this function:

◆ residual()

real(rp) function newton_mod::residual ( real(rp), dimension(:), intent(in)  Fx,
real(rp), dimension(:), intent(in)  x 
)
private

Residual.

Definition at line 181 of file newton_mod.f90.