B_eq_A.F


#include "iadefines.h"
c**********************************************************************
#include "author.inc"
c*    $Id: B_eq_A.F,v 1.11 1996/04/24 19:15:07 turner Exp $
c*
c*    Copies a matrix.
c*
c*    <PARAMETER LIST>
c*
c*     Input:
c*      a - matrix to be copied
c*      ia - integer vector containing info about how "a" is stored
c*        NOTE: see description of ia below
c*      ja - column index array for a
c*
c*     Output:
c*      b - destination matrix
c*      ib - integer vector containing info about how "b" is stored
c*        NOTE: see description of ia below
c*      jb - column index array for b
c*      status - return status
c*        -1  ==>  invalid argument(s)
c*         0  ==>  success
c*
c*    <SUBROUTINES REQUIRED>
c*
c*     JT_B_eq_A_Full
c*     JT_B_eq_A_ELL
c*     JT_B_eq_A_COO
c*     JT_B_eq_A_RSS
c*     JT_B_eq_A_CSS
c*     JT_iy_eq_ix
c*
#include "iadesc.inc"
c*
#include "copyright.inc"
c**********************************************************************
      subroutine JT_B_eq_A (a, ia, ja, b, ib, jb, status)
      implicit none
c
c ... Input:
      integer ia(_JT_no_of_storage_parameters_), ja(*)
      real a(*)
c
c ... Output:
      integer status
      integer ib(_JT_no_of_storage_parameters_), jb(*)
      real b(*)
c
      call JT_iy_eq_ix (_JT_no_of_storage_parameters_, ia, ib, status)
c
      if (ia(_JT_storage_) .eq. _JT_storage_full_) then
       call JT_B_eq_A_Full (ia(_JT_idim_), ib(_JT_idim_), ia(_JT_nrows_),
     &      ia(_JT_maxnz_), a, b, status)
      elseif (ia(_JT_storage_) .eq. _JT_storage_ELL_) then
       call JT_B_eq_A_ELL (ia(_JT_idim_), ib(_JT_idim_), ia(_JT_nrows_),
     &      ia(_JT_maxnz_), a, ja, b, jb, status)
      elseif (ia(_JT_storage_) .eq. _JT_storage_COO_) then
       call JT_B_eq_A_COO (ia(_JT_nelem_), a, ja, b, jb, status)
      elseif (ia(_JT_storage_).eq._JT_storage_RSS_ .or.
     &        ia(_JT_storage_).eq._JT_storage_CSS_) then
       call JT_B_eq_A_xSS (ia(_JT_nelem_), a, ja, b, jb, status)
      else
       status = -1
      endif
c
      return
      end