newton_sp_metadata Derived Type

type, public, extends(abstract_metadata) :: newton_sp_metadata

Metadata for Newton-Krylov fixed-point iteration.


Components

Type Visibility Attributes Name Initial
logical, public :: converged = .false.

Convergence flag

integer, public :: eval_counter_record = 0

System response evaluation counter: N.B.: For each of these evals the current residual and tolerance are recorded.

integer, public :: info = 0

Copy of the information flag for completeness

logical, public :: input_is_fixed_point = .false.

Flag indicating lucky convergence (Newton is not run and no solution is computed)

integer, public :: n_iter = 0

Iteration counter

real(kind=sp), public, dimension(:), allocatable :: res

Residual history

real(kind=sp), public, dimension(:), allocatable :: tol

Tolerance history


Type-Bound Procedures

procedure, public, pass(self) :: print => print_newton_sp

  • private subroutine print_newton_sp(self, reset_counters, verbose)

    Arguments

    Type IntentOptional Attributes Name
    class(newton_sp_metadata), intent(inout) :: self
    logical, intent(in), optional :: reset_counters

    Reset all counters to zero after printing?

    logical, intent(in), optional :: verbose

    Print the residual full residual history?

procedure, public, pass(self) :: record => record_data_sp

  • private subroutine record_data_sp(self, res, tol)

    Arguments

    Type IntentOptional Attributes Name
    class(newton_sp_metadata), intent(inout) :: self
    real(kind=sp) :: res

    Residual of the current evaluation

    real(kind=sp) :: tol

    Tolerance of the current evaluation

procedure, public, pass(self) :: reset => reset_newton_sp

  • private subroutine reset_newton_sp(self)

    Arguments

    Type IntentOptional Attributes Name
    class(newton_sp_metadata), intent(inout) :: self