type_crs Derived Type

type, public, extends(abst_matrix) :: type_crs


Inherits

type~~type_crs~~InheritsGraph type~type_crs type_crs type~abst_matrix abst_matrix type~type_crs->type~abst_matrix

Inherited by

type~~type_crs~~InheritedByGraph type~type_crs type_crs type~abst_thermal abst_thermal type~abst_thermal->type~type_crs KT_star_0, KT_l, KT_old, CT_l, CT_old type~type_ftdss type_ftdss type~type_ftdss->type~abst_thermal Thermal type~type_thermal_3phase_2d type_thermal_3phase_2d type~type_thermal_3phase_2d->type~abst_thermal

Components

Type Visibility Attributes Name Initial
integer(kind=int32), public, allocatable :: ind(:)
integer(kind=int32), public :: nnz
integer(kind=int32), public :: num_ptr
integer(kind=int32), public :: num_row
integer(kind=int32), public, allocatable :: ptr(:)
real(kind=real64), public, allocatable :: val(:)

Type-Bound Procedures

procedure, public, pass(self) :: copy => copy_crs

  • private function copy_crs(self) result(B)

    Arguments

    Type IntentOptional Attributes Name
    class(type_crs), intent(in) :: self

    Return Value class(abst_matrix), allocatable

procedure, public, pass(self) :: destory => destory_crs

  • private subroutine destory_crs(self)

    Arguments

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

procedure, public, pass(self) :: find => find_crs

  • private subroutine find_crs(self, row, col, index)

    Arguments

    Type IntentOptional Attributes Name
    class(type_crs), intent(in) :: self
    integer(kind=int32), intent(in) :: row
    integer(kind=int32), intent(in) :: col
    integer(kind=int32), intent(inout) :: index

procedure, public, pass(self) :: initialize => initialize_type_crs

Source Code

    type, extends(abst_matrix) :: type_crs
        integer(int32) :: nnz ! number of non-zero elements
        integer(int32) :: num_row ! number of rows
        integer(int32) :: num_ptr ! size of ptr (num_row+1 entries)
        integer(int32), allocatable :: ptr(:) ! pointers to row starts (1-based)
        integer(int32), allocatable :: ind(:) ! column indices of non-zeros
        real(real64), allocatable :: val(:) ! non-zero values
    contains
        procedure, public, pass(self) :: initialize => initialize_type_crs
        procedure, public, pass(self) :: find => find_crs
        procedure, public, pass(self) :: copy => copy_crs
        procedure, public, pass(self) :: destory => destory_crs
    end type type_crs