IterativeMethod Derived Type

type, public :: IterativeMethod


Inherits

type~~iterativemethod~~InheritsGraph type~iterativemethod IterativeMethod type~iterativemethodrequirements IterativeMethodRequirements type~iterativemethod->type~iterativemethodrequirements requirements type~methodpreconditioner MethodPreconditioner type~iterativemethod->type~methodpreconditioner preconditioner_type type~methodtypeiterative MethodTypeIterative type~iterativemethod->type~methodtypeiterative method_type type~relaxation_factor_used relaxation_factor_used type~iterativemethod->type~relaxation_factor_used relaxation_factor, relaxation_factor_preconditioner

Inherited by

type~~iterativemethod~~InheritedByGraph type~iterativemethod IterativeMethod type~linalg linalg type~linalg->type~iterativemethod iterative

Type-Bound Procedures

procedure, public :: set_method

  • private subroutine set_method(this, method)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    type(MethodTypeIterative), intent(in) :: method

procedure, public :: solve => IterativeMethod_solve

  • private function IterativeMethod_solve(this, A, b, params, verbose) result(x)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(in) :: this
    real(kind=dp), intent(in), dimension(:, :) :: A
    real(kind=dp), intent(in), dimension(:) :: b
    type(IterativeParams), intent(inout) :: params
    type(Logger), intent(inout), optional :: verbose

    Return Value real(kind=dp), dimension(size(A, 1))

procedure, public :: Init_IterativeParams

  • private function Init_IterativeParams(this, N, A, x0, max_iter_choice, epsi_tol, omega, Norm_choice, fill_level, method_preconditioner, alpha, is_stationary, is_strict_mode) result(params)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    integer, intent(in) :: N
    real(kind=dp), intent(in), optional, dimension(:, :) :: A
    real(kind=dp), intent(in), optional, dimension(:) :: x0
    integer, intent(in), optional :: max_iter_choice
    real(kind=dp), intent(in), optional :: epsi_tol
    real(kind=dp), intent(in), optional :: omega
    type(Norm_used), intent(in), optional :: Norm_choice
    type(Fill_level_used), intent(in), optional :: fill_level
    type(MethodPreconditioner), intent(in), optional :: method_preconditioner
    real(kind=dp), intent(in), optional :: alpha
    logical, intent(in), optional :: is_stationary
    logical, intent(in), optional :: is_strict_mode

    Return Value type(IterativeParams)

procedure, public :: Dealocate_IterativeParams

  • private subroutine Dealocate_IterativeParams(this, params, success)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    type(IterativeParams), intent(inout) :: params
    logical, intent(out), optional :: success

procedure, public :: test_matrix

  • private subroutine test_matrix(this, A, params, verbose)

    Arguments

    Type IntentOptional Attributes Name
    class(IterativeMethod), intent(inout) :: this
    real(kind=dp), intent(in), dimension(:, :) :: A
    type(IterativeParams), intent(in) :: params
    type(Logger), intent(inout), optional :: verbose

Source Code

    type :: IterativeMethod
        private
        type(MethodTypeIterative) :: method_type = METHOD_ITERATIVE_NONE
        type(MethodPreconditioner) :: preconditioner_type = METHOD_PRECOND_NONE
        type(IterativeMethodRequirements) :: requirements
        type(relaxation_factor_used) :: relaxation_factor = RELAXATION_FACTOR_NONE
        type(relaxation_factor_used) :: relaxation_factor_preconditioner = RELAXATION_FACTOR_NONE
        procedure(solve_interface_Iterative), pass(this), pointer :: solve_method => null()

    contains

        procedure :: set_method => set_method
        procedure :: solve => IterativeMethod_solve
        procedure :: Init_IterativeParams => Init_IterativeParams
        procedure :: Dealocate_IterativeParams => Dealocate_IterativeParams
        procedure :: test_matrix => test_matrix

    end type IterativeMethod