sf_dump_cmatrix_coo Subroutine

public subroutine sf_dump_cmatrix_coo(sparse, matrix)

Arguments

Type IntentOptional Attributes Name
type(sf_sparse_cmatrix_coo), intent(in) :: sparse
complex(kind=8), intent(inout), dimension(:,:) :: matrix

Called by

proc~~sf_dump_cmatrix_coo~~CalledByGraph proc~sf_dump_cmatrix_coo sf_dump_cmatrix_coo interface~sf_dump_matrix_coo sf_dump_matrix_coo interface~sf_dump_matrix_coo->proc~sf_dump_cmatrix_coo

Source Code

  subroutine sf_dump_cmatrix_coo(sparse,matrix)
    type(sf_sparse_cmatrix_coo),intent(in)      :: sparse
    complex(8),dimension(:,:),intent(inout) :: matrix
    complex(8)                              :: vals
    integer                                 :: i,col,row,Ndim1,Ndim2
    !
#ifdef _DEBUG
    write(*,"(A)")"DEBUG sf_dump_cmatrix_coo: dump sparse"
#endif
    !
    Ndim1=size(matrix,1)
    Ndim2=size(matrix,2)
    !
    if(sparse%Nrow/=Ndim1 .OR. sparse%Ncol/=Ndim2)stop "Warning SPARSE/dump_matrix: dimensions error"
    !
    do i=1,sparse%Size
       row=sparse%rows(i);  col=sparse%cols(i)
       matrix(row,col) = matrix(row,col) + sparse%vals(i)
    enddo
  end subroutine sf_dump_cmatrix_coo