pcg_t Derived Type

type, public :: pcg_t

@brief PCG solver for equation Ax=b


Inherits

type~~pcg_t~~InheritsGraph type~pcg_t pcg_t c_ptr c_ptr type~pcg_t->c_ptr dat

Components

Type Visibility Attributes Name Initial
logical, public :: initialized = .false.
integer(kind=8), public :: errcode = 0
real(kind=dp), public, allocatable :: b(:)
real(kind=dp), public, allocatable :: x(:)
real(kind=dp), public, allocatable :: Ap(:)
real(kind=dp), public, allocatable :: p(:)
real(kind=dp), public, allocatable :: r(:)
real(kind=dp), public, allocatable :: y(:)
real(kind=dp), public :: error = huge(1.0_dp)
real(kind=dp), public :: tol = 0.0_dp
procedure(pcg_matvec), public, nopass, pointer :: precond => null()
procedure(pcg_matvec), public, nopass, pointer :: update => null()
type(c_ptr), public :: dat = c_null_ptr

Type-Bound Procedures

procedure, public :: init => pcg_init

  • private subroutine pcg_init(this, b, update, precond, dat, x0, tol)

    Arguments

    Type IntentOptional Attributes Name
    class(pcg_t), intent(inout) :: this
    real(kind=dp), intent(in) :: b(:)
    procedure(pcg_matvec) :: update
    procedure(pcg_matvec) :: precond
    type(*), target :: dat
    real(kind=dp), intent(in), optional :: x0(:)
    real(kind=dp), intent(in), optional :: tol

procedure, public :: clean => pcg_clean

  • private subroutine pcg_clean(this)

    Arguments

    Type IntentOptional Attributes Name
    class(pcg_t), intent(inout) :: this

procedure, public :: step => pcg_step

  • private subroutine pcg_step(this)

    Arguments

    Type IntentOptional Attributes Name
    class(pcg_t), intent(inout) :: this