From 90e7d688b41a07c8cdbc10bbb3e884112c7eaaae Mon Sep 17 00:00:00 2001 From: SamueleGiuli Date: Wed, 10 Jul 2024 15:33:36 +0200 Subject: [PATCH] Small bug fix from SF_SPARSE missing a routine for interface --- src/SF_SPARSE/SF_SPARSE_ARRAY_ALGEBRA.f90 | 24 +++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/SF_SPARSE/SF_SPARSE_ARRAY_ALGEBRA.f90 b/src/SF_SPARSE/SF_SPARSE_ARRAY_ALGEBRA.f90 index c93010781..2266f3bc3 100644 --- a/src/SF_SPARSE/SF_SPARSE_ARRAY_ALGEBRA.f90 +++ b/src/SF_SPARSE/SF_SPARSE_ARRAY_ALGEBRA.f90 @@ -97,6 +97,30 @@ function dmatmul_csc_csc(A,B) return(AxB) end do end function dmatmul_csc_csc + function zmatmul_csc_csc(A,B) return(AxB) + type(sparse_zmatrix_csc), intent(in) :: A,B + type(sparse_zmatrix_csc) :: AxB + integer :: Na(2),Nb(2) + integer :: icol,j,jrow,k,krow + complex(8) :: aval,bval + + Na = A%shape(); Nb = B%shape() + if(Na(2)/=Nb(1))stop "Matrix not matching dimension in zmatmul_csc_csc" + call AxB%free() + call AxB%init(Na(1),Nb(2)) + do icol=1,Nb(2) + do j=1,B%col(icol)%Size + jrow=B%col(icol)%rows(j) + bval=B%col(icol)%vals(j) + do k=1,A%col(jrow)%Size + krow=A%col(jrow)%rows(k) + aval=A%col(jrow)%vals(k) + AxB%insert(aval*bval,krow,icol) + end do + end do + end do + end function zmatmul_csc_csc + function dmatmul_csc_csr_2csc(A,B) return(AxB)