alloc_matrix Subroutine

private subroutine alloc_matrix(me, dim1, dim2)

This routine allocates matrix with given dimentions

Arguments

Type IntentOptional Attributes Name
type(tem_matrix_type) :: me
integer, intent(in) :: dim1
integer, intent(in) :: dim2

Calls

proc~~alloc_matrix~~CallsGraph proc~alloc_matrix alloc_matrix proc~tem_abort tem_abort proc~alloc_matrix->proc~tem_abort mpi_abort mpi_abort proc~tem_abort->mpi_abort

Called by

proc~~alloc_matrix~~CalledByGraph proc~alloc_matrix alloc_matrix proc~build_matrixlsf_linearintp build_matrixLSF_linearIntp proc~build_matrixlsf_linearintp->proc~alloc_matrix proc~build_matrixlsf_quadintp build_matrixLSF_quadIntp proc~build_matrixlsf_quadintp->proc~alloc_matrix proc~append_intpmatrixlsf append_intpMatrixLSF proc~append_intpmatrixlsf->proc~build_matrixlsf_linearintp proc~append_intpmatrixlsf->proc~build_matrixlsf_quadintp interface~append~9 append interface~append~9->proc~append_intpmatrixlsf

Source Code

  subroutine alloc_matrix( me, dim1, dim2 )
    ! --------------------------------------------------------------------------
    type( tem_matrix_type ) :: me
    integer, intent(in) :: dim1
    integer, intent(in) :: dim2
    ! --------------------------------------------------------------------------

    if ( dim1 > 0 .and. dim2 > 0 ) then
      me%nEntries(1) = dim1
      me%nEntries(2) = dim2
      allocate( me%A( dim1, dim2 ) )
      me%A = 0.0_rk
    else
      write( logUnit(1), "(A)" ) &
        &  'Failed to allocate matrix. Dimension is negative number.'
      call tem_abort()
    end if

  end subroutine alloc_matrix