newton_dp_metadata Derived Type

type, public, extends(abstract_metadata) :: newton_dp_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=dp), public, dimension(:), allocatable :: res

Residual history

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

Tolerance history


Type-Bound Procedures

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

  • private subroutine print_newton_dp(self, reset_counters, verbose)

    Arguments

    Type IntentOptional Attributes Name
    class(newton_dp_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_dp

  • private subroutine record_data_dp(self, res, tol)

    Arguments

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

    Residual of the current evaluation

    real(kind=dp) :: tol

    Tolerance of the current evaluation

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

  • private subroutine reset_newton_dp(self)

    Arguments

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