This routine provides assignment operator of tem_matrix_type
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(tem_matrix_type), | intent(out) | :: | left | |||
type(tem_matrix_type), | intent(in) | :: | right |
subroutine copy_matrix(left, right)
! --------------------------------------------------------------------------
type(tem_matrix_type), intent(out) :: left
type(tem_matrix_type), intent(in) :: right
! --------------------------------------------------------------------------
left%nEntries = right%nEntries
if (allocated(right%A)) then
allocate(left%A(right%nEntries(1), right%nEntries(2)))
left%A = right%A
end if
end subroutine copy_matrix