conjugateGradient_t Derived Type

type, public, extends(solver_t) :: conjugateGradient_t

type~~conjugategradient_t~~InheritsGraph type~conjugategradient_t conjugateGradient_t type~solver_t solver_t type~solver_t->type~conjugategradient_t
Help



Components

TypeVisibility AttributesNameInitial
integer, public :: maxIts =-1
real(kind=wp), public :: tol =1.0E-6_wp
character(len=:), public, allocatable:: name_long
character(len=:), public, allocatable:: name_short
real(kind=wp), public :: solveTime

Constructor

public interface conjugateGradient_t

  • private function newConjugateGradient() result(self)

    Arguments

    None

    Return Value type(conjugateGradient_t)


Type-Bound Procedures

procedure, public :: setup => setup_cg

  • private subroutine setup_cg(self, A)

    Arguments

    Type IntentOptional AttributesName
    class(conjugateGradient_t), intent(inout) :: self
    class(sparse_t), intent(in) :: A

procedure, public :: step => step_cg

  • private function step_cg(self, A, b, x0, l) result(x)

    Arguments

    Type IntentOptional AttributesName
    class(conjugateGradient_t), intent(inout) :: self
    class(sparse_t), intent(in) :: A
    real(kind=wp), intent(in), dimension(A%N):: b
    real(kind=wp), intent(in), dimension(A%N):: x0
    integer, intent(in) :: l

    Return Value real(kind=wp), dimension(:), allocatable

procedure, public :: solve => solve_cg

  • private function solve_cg(self, A, b, x0) result(x)

    Arguments

    Type IntentOptional AttributesName
    class(conjugateGradient_t), intent(inout) :: self
    class(sparse_t), intent(in) :: A
    real(kind=wp), intent(in), dimension(A%N):: b
    real(kind=wp), intent(in), optional dimension(A%N):: x0

    Return Value real(kind=wp), dimension(:), allocatable