IterativeParams Derived Type

type, public :: IterativeParams


Inherits

type~~iterativeparams~~InheritsGraph type~iterativeparams IterativeParams type~fill_level_used Fill_level_used type~iterativeparams->type~fill_level_used fill_level type~norm_used Norm_used type~iterativeparams->type~norm_used norm

Components

Type Visibility Attributes Name Initial
real(kind=dp), public, dimension(:), allocatable :: x_init
real(kind=dp), public, dimension(:, :), allocatable :: L
real(kind=dp), public, dimension(:, :), allocatable :: U
real(kind=dp), public, dimension(:, :), allocatable :: D
real(kind=dp), public, dimension(:), allocatable :: p
real(kind=dp), public, dimension(:), allocatable :: residual
real(kind=dp), public :: norm_residual
real(kind=dp), public :: norm_initial_residual = 1.d0
real(kind=dp), public :: tol = 1.0d-12
integer, public :: k = 0
integer, public :: max_iter = 1000
real(kind=dp), public :: omega = 1.d0
real(kind=dp), public :: alpha = 1.d0
real(kind=dp), public :: beta = 1.d0
type(Fill_level_used), public :: fill_level = FILL_LEVEL_NONE
logical, public :: is_stationary = .true.
logical, public :: strict_mode = .false.
real(kind=dp), public :: old_dot_product = 0.d0
type(Norm_used), public :: norm = NORM_2
procedure(ApplyPreconditioner), public, pass(params), pointer :: precond

Type-Bound Procedures

procedure, public :: norm_function

  • private function norm_function(this, vector) result(result)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeParams), intent(in) :: this
    real(kind=dp), intent(in), dimension(:) :: vector

    Return Value real(kind=dp)

Source Code

    type :: IterativeParams
        ! Solution and initial guess
        real(dp), dimension(:), allocatable :: x_init
        ! Preconditioner matrices
        real(dp), dimension(:, :), allocatable :: L, U, D
        ! Algorithm vectors
        real(dp), dimension(:), allocatable :: p
        real(dp), dimension(:), allocatable :: residual
        ! Norms and tolerances
        real(dp) :: norm_residual
        real(dp) :: norm_initial_residual = 1.d0
        real(dp) :: tol = 1.0d-12
        ! Iteration control
        integer :: k = 0
        integer :: max_iter = 1000
        ! Method parameters
        real(dp) :: omega = 1.d0
        real(dp) :: alpha = 1.d0
        real(dp) :: beta = 1.d0
        ! ILU/IC fill level
        type(FILL_LEVEL_USED) :: fill_level = FILL_LEVEL_NONE
        ! Flags
        logical :: is_stationary = .true.
        logical :: strict_mode = .false.
        ! Miscellaneous
        real(dp) :: old_dot_product = 0.d0
        type(Norm_used) :: norm = NORM_2
        ! Preconditioner procedure pointer
        procedure(ApplyPreconditioner), pass(params), pointer :: precond

    contains

        procedure :: norm_function
    end type IterativeParams