45 type,
extends(basematrix) :: matrixelementvector
46 type(matrixcache) :: matrix_cache
48 procedure,
public :: sort => sort_matelem
50 procedure,
public :: initialize_struct_self => initialize_struct_standard
51 procedure,
public :: construct_self => construct_mat_standard
52 procedure,
public :: insert_matelem_self => insert_matelem_standard
53 procedure,
public :: get_matelem_self => get_matelem_standard
54 procedure,
public :: clear_self => clear_standard
55 procedure,
public :: expand_capacity => expand_standard
56 procedure,
public :: destroy_self => destroy_standard
59 end type matrixelementvector
99 subroutine initialize_struct_standard (this, matrix_size, matrix_type, block_size)
100 class(matrixelementvector) :: this
101 integer,
intent(in) :: matrix_size, matrix_type, block_size
104 this % initialized = .true.
114 subroutine insert_matelem_standard (this, i, j, coefficient, class, thresh)
115 class(matrixelementvector) :: this
116 integer,
intent(in) :: i, j, class
117 real(wp),
intent(in) :: coefficient, thresh
120 if (abs(coefficient) < thresh)
return
122 call this % matrix_cache % insert_into_cache(i, j, coefficient)
124 this % n = this % matrix_cache % n
133 subroutine get_matelem_standard (this, idx, i, j, coeff)
134 class(matrixelementvector) :: this
135 integer,
intent(in) :: idx
136 integer,
intent(out) :: i, j
137 real(wp),
intent(out) :: coeff
139 call this % matrix_cache % get_from_cache(idx, i, j, coeff)
148 subroutine expand_standard (this, capacity)
149 class(matrixelementvector) :: this
150 integer,
intent(in) :: capacity
152 call this % matrix_cache % expand_capacity(capacity)
154 write (stdout,
"('Current Matrix array size is ',i4)") this % matrix_cache % max_capacity