      SUBROUTINE SMCRTR ( ZR, ZD )
C
C  THIS SUBROUTINE MOVES DATA FROM STRINGS TO OPEN CORE AND PERFORMS      
C  ANY TYPE CONVERSIONS REQUIRED.  KTYPE IS THE TYPE THAT THE
C  DECOMPOSITION IS TO BE DONE.  MTYPE IS THE TYPE OF INPUT DATA ON
C  THE MATRIX TO BE DECOMPOSED.  ISKIP IS THE NUMBER OF TERMS AT THE
C  BEGINNING OF THE STRING TO SKIP OVER.
C      
      REAL              ZR(10)
      DOUBLE PRECISION  XND(10), ZD(10)
      INCLUDE 'SMCOMX.COM'
      COMMON  /ZZZZZZ/  XNS(10)
      EQUIVALENCE       ( XNS, XND )
      EQUIVALENCE       ( MBLK(6), MTERMS ), (MBLK(5), MSTR )
      EQUIVALENCE       ( MBLK(4), MROW   ), (MBLK(2), MTYPE)
      GO TO ( 1000, 2000, 3000, 4000 ), KTYPE
1000  GO TO ( 1010, 1020, 1030, 1040 ), MTYPE
C
C INPUT IS RS AND DECOMPOSITION TO BE DONE IN RS
C
1010  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 1015 K = 1, NUM
      ZR( INDEXV + K - 1 ) = XNS( ISTR + K - 1 )
1015  CONTINUE
      INDEXV = INDEXV + NUM           
      GO TO 7000
C
C INPUT IS RD AND DECOMPOSITION TO BE DONE IN RS   
C
1020  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 1025 K = 1, NUM
      ZR( INDEXV + K - 1 ) = XND( ISTR + K - 1 )
1025  CONTINUE
      INDEXV  = INDEXV  + NUM
      GO TO 7000
C
C INPUT IS CS AND DECOMPOSITION TO BE DONE IN RS   
C
1030  CONTINUE
      ISTR   = MSTR   + ISKIP*2
      NUM    = MTERMS - ISKIP 
      DO 1035 K = 1, NUM
      ZR( INDEXV + K - 1 ) = XNS( ISTR + (K-1)*2 )
1035  CONTINUE
      INDEXV = INDEXV + NUM           
      GO TO 7000
C
C INPUT IS CD AND DECOMPOSITION TO BE DONE IN RS
C
1040  CONTINUE
      ISTR   = MSTR   + ISKIP*2
      NUM    = MTERMS - ISKIP 
      DO 1045 K = 1, NUM
      ZR( INDEXV + K - 1 ) = XND( ISTR + (K-1)*2 )
1045  CONTINUE
      INDEXV  = INDEXV  + NUM
      GO TO 7000
2000  GO TO ( 2010, 2020, 2030, 2040 ), MTYPE
C
C INPUT IS RS AND DECOMPOSITION TO BE DONE IN RD
C
2010  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 2015 K = 1, NUM
      ZD( INDEXVD + K - 1 ) = XNS( ISTR + K - 1 )
2015  CONTINUE
      INDEXV  = INDEXV  + 2*NUM           
      INDEXVD = INDEXVD + NUM
      GO TO 7000
C
C INPUT IS RD AND DECOMPOSITION TO BE DONE IN RD   
C
2020  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 2025 K = 1, NUM
      ZD( INDEXVD + K - 1 ) = XND( ISTR + K - 1 )
2025  CONTINUE
      INDEXVD = INDEXVD + NUM               
      INDEXV  = INDEXV  + 2*NUM
      GO TO 7000
C
C INPUT IS CS AND DECOMPOSITION TO BE DONE IN RD   
C
2030  CONTINUE
      ISTR   = MSTR + ISKIP*2
      NUM    = MTERMS - ISKIP 
      DO 2035 K = 1, NUM
      ZD( INDEXVD + K - 1 ) = XNS( ISTR + (K-1)*2 )
2035  CONTINUE
      INDEXV  = INDEXV  + 2*NUM           
      INDEXVD = INDEXVD + NUM
      GO TO 7000
C
C INPUT IS CD AND DECOMPOSITION TO BE DONE IN RD
C
2040  CONTINUE
      ISTR   = MSTR + ISKIP*2
      NUM    = MTERMS - ISKIP 
      DO 2045 K = 1, NUM
      ZD( INDEXVD + K - 1 ) = XND( ISTR + (K-1)*2 )
2045  CONTINUE
      INDEXVD = INDEXVD + NUM           
      INDEXV  = INDEXV  + 2*NUM
      GO TO 7000
3000  GO TO ( 3010, 3020, 3030, 3040 ), MTYPE
C
C INPUT IS RS AND DECOMPOSITION TO BE DONE IN CS
C
3010  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 3015 K = 1, NUM
      ZR( INDEXV + (K-1)*2 )   = XNS( ISTR + K - 1 )
      ZR( INDEXV + (K-1)*2+1 ) = 0.0
3015  CONTINUE
      INDEXV = INDEXV + 2*NUM           
      GO TO 7000
C
C INPUT IS RD AND DECOMPOSITION TO BE DONE IN CS   
C
3020  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 3025 K = 1, NUM
      ZR( INDEXV + (K-1)*2 )     = XND( ISTR + K - 1 )  
      ZR( INDEXV + (K-1)*2 + 1 ) = 0.0D0  
3025  CONTINUE
      INDEXV  = INDEXV  + 2*NUM
      GO TO 7000
C
C INPUT IS CS AND DECOMPOSITION TO BE DONE IN CS   
C
3030  CONTINUE
      ISTR   = MSTR + ISKIP*2
      NUM    = ( MTERMS - ISKIP ) * 2
      DO 3035 K = 1, NUM
      ZR( INDEXV + K - 1 ) = XNS( ISTR + K - 1 )
3035  CONTINUE
      INDEXV = INDEXV + NUM           
      GO TO 7000
C
C INPUT IS CD AND DECOMPOSITION TO BE DONE IN CS
C
3040  CONTINUE
      ISTR   = MSTR + ISKIP*2
      NUM    = ( MTERMS - ISKIP ) * 2
      DO 3045 K = 1, NUM
      ZR( INDEXV + K - 1 ) = XND( ISTR + K - 1 )
3045  CONTINUE
      INDEXV  = INDEXV  + NUM
      GO TO 7000
4000  GO TO ( 4010, 4020, 4030, 4040 ), MTYPE
C
C INPUT IS RS AND DECOMPOSITION TO BE DONE IN CD
C
4010  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 4015 K = 1, NUM
      ZD( INDEXVD + (K-1)*2 )   = XNS( ISTR + K - 1 )
      ZD( INDEXVD + (K-1)*2+1 ) = 0.0
4015  CONTINUE
      INDEXV = INDEXV   + 4*NUM           
      INDEXVD = INDEXVD + 2*NUM
      GO TO 7000
C
C INPUT IS RD AND DECOMPOSITION TO BE DONE IN CD   
C
4020  CONTINUE
      ISTR   = MSTR   + ISKIP
      NUM    = MTERMS - ISKIP 
      DO 4025 K = 1, NUM
      ZD( INDEXVD + (K-1)*2 )     = XND( ISTR + K - 1 )  
      ZD( INDEXVD + (K-1)*2 + 1 ) = 0.0D0  
4025  CONTINUE
      INDEXV  = INDEXV  + 4*NUM
      INDEXVD = INDEXVD + 2*NUM
      GO TO 7000
C
C INPUT IS CS AND DECOMPOSITION TO BE DONE IN CD   
C
4030  CONTINUE
      ISTR   = MSTR + ISKIP*2
      NUM    = ( MTERMS - ISKIP ) * 2
      DO 4035 K = 1, NUM
      ZD( INDEXVD + K - 1 ) = XNS( ISTR + K - 1 )
4035  CONTINUE
      INDEXV  = INDEXV + 2*NUM           
      INDEXVD = INDEXVD + NUM
      GO TO 7000
C
C INPUT IS CD AND DECOMPOSITION TO BE DONE IN CD
C
4040  CONTINUE
      ISTR   = MSTR + ISKIP*2
      NUM    = ( MTERMS - ISKIP ) * 2
      DO 4045 K = 1, NUM
      ZD( INDEXVD + K - 1 ) = XND( ISTR + K - 1 )
4045  CONTINUE
      INDEXV  = INDEXV  + 2*NUM
      INDEXVD = INDEXVD + NUM
      GO TO 7000
7000  RETURN
      END
