LoadCoeff.F


#include "iadefines.h"
c**********************************************************************
#include "author.inc"
c*    $Id: LoadCoeff.F,v 1.4 1996/07/08 00:51:21 turner Exp $
c*
c*    Subroutine to load the nonzero elements of a coefficient matrix
c*    in a variety of storage formats.
c*
c*    <PARAMETER LIST>
c*
c*     Input:
c*      lu - logical unit from which to read
c*
c*     Output:
c*      a - coefficient matrix
c*      ia - integer vector containing info about how "a" is stored
c*        NOTE: see description of ia below
c*      ja - map array
c*      status - return status
c*        -1  ==>  invalid argument(s)
c*         0  ==>  success
c*
#include "iadesc.inc"
c*
c*    <SUBROUTINES REQUIRED>
c*
c*     JT_LoadCoeff_Full - for full-storage format
c*     JT_LoadCoeff_ELL - for ELL storage format
c*     JT_LoadCoeff_COO - for coordinate format
c*     JT_LoadCoeff_RSS - for RSS format
c*     JT_LoadCoeff_CSS - for CSS format
c*
#include "copyright.inc"
c**********************************************************************
      subroutine JT_LoadCoeff (lu, a, ia, ja, status)
      implicit none
c
c ... Input:
      integer lu
      integer ia(_JT_no_of_storage_parameters_)
      integer ja(*)
      real a(*)
c
c ... Output:
      integer status
c
      if (ia(_JT_storage_) .eq. _JT_storage_full_) then
       call JT_LoadCoeff_Full (lu, ia(_JT_idim_), ia(_JT_nrows_), ia(_JT_nrows_), a, status)
      else if (ia(_JT_storage_) .eq. _JT_storage_ELL_) then
       call JT_LoadCoeff_ELL (lu, ia(_JT_idim_), ia(_JT_nrows_), ia(_JT_maxnz_), a, ja, status)
      else if (ia(_JT_storage_) .eq. _JT_storage_COO_) then
       call JT_LoadCoeff_COO (lu, ia(_JT_nelem_), a, ja, status)
      else if (ia(_JT_storage_) .eq. _JT_storage_RSS_) then
       call JT_LoadCoeff_RSS (lu, ia(_JT_nelem_), a, ja, status)
      else if (ia(_JT_storage_) .eq. _JT_storage_CSS_) then
       call JT_LoadCoeff_CSS (lu, ia(_JT_nelem_), a, ja, status)
      else
       status = -1
      endif
c
      return
      end