copy_matrix Subroutine

private subroutine copy_matrix(left, right)

This routine provides assignment operator of tem_matrix_type

Arguments

Type IntentOptional Attributes Name
type(tem_matrix_type), intent(out) :: left
type(tem_matrix_type), intent(in) :: right

Called by

proc~~copy_matrix~~CalledByGraph proc~copy_matrix copy_matrix interface~assignment(=)~4 assignment(=) interface~assignment(=)~4->proc~copy_matrix

Source Code

  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