*
*
***********************************************************************
*
* Set up all the parameters for CMStab
*
*
******
*
      
      real zeta,stptst
      integer ntest,itmax,iters,level,iounit,iprecon,method,
     .     irstrt,maxrstrt,restarts,timer
*
*          iparm(1) = ntest
*               The stopping test number, in the range 1 to 6,
*               specifying which stopping test is to be used to
*               terminate iteration as follows:
*                    ntest = 1      ||r||          <= zeta
*                    ntest = 2      ||r||/||b||    <= zeta
*                    ntest = 3      ||z||          <= zeta
*                    ntest = 4      ||z||/||Q*b||  <= zeta
*                    ntest = 5      ainf(r)        <= zeta
*                    ntest = 6      ainf(z)        <= zeta
*               where r = residual = b - A*x
*                     b = right-hand side of linear system A*x = b
*                     z = preconditioned residual = Q*(b - A*P*x)
*                     ||r|| = the Euclidean norm (2-norm) of r
*                     ainf(r) = the infinity norm (max-norm) of r

      parameter (ntest=2)

*
*          iparm(2) = itmax
*               This is the maximum number of iterations allowed.

      parameter (itmax=1500)

*
*          iparm(4) = level
*               This is the level and type of information output by the
*               solver (if iounit > 0).
*                    level = 0     Output error messages only
*                    level = 1     Output input parameters
*                    level = 2     Output stptst at each iteration
*                    level = 3     Output both level = 1 and level = 2
*                                       information

      parameter (level=3)

*                     
*          iparm(5) = iounit
*               This is the Fortran unit number for output.

      parameter (iounit=20)

*
*          iparm(6) = iprecon
*               This indicates the type of preconditioning to be
*               performed.
*                    iprecon = 0     No preconditioning
*                    iprecon = 1     Left preconditioning
*                    iprecon = 3     Split preconditioning

      parameter (iprecon=0)

*
*          iparm(7) = method
*               This indicates the iterative methods to be used.
*                    method = 1     CG      Conjugate Gradients on A
*                    method = 2     CGNR    Conjugate Gradients on AT*A
*                    method = 3     BICG    Bi-Conjugate Gradients on A
*                    method = 4     BICGS   (Bi-)Conjugate Gradients
*                                                Squared on A
*                    method = 5     BICGST  Bi-CGStab on A
*                    method = 6     BICGST2 Bi-CGStab2 on A
*               Where A is the coefficient matrix in the linear system
*               A*x = b.  And AT is the transpose of A

*     parameter (method=1)

*
*          iparm(8) = irestrt
*               This indicates whether or not to restart the iterative
*               solver in the case of breakdown for the Bi-CG, Bi-CGS,
*               Bi-CGStab and Bi-CGStab2 algorithms.
*
*                    irstrt = 0     Do not restart iterative method
*                    irstrt = 1     Allow up to maxrstrt restarts
*                                        of iterative method

      parameter (irstrt=1)

*
*          iparm(9) = maxrstrt
*                If irstrt = 1, this indicates the maximum number of
*                restarts allowed for the iterative solver.

      parameter (maxrstrt=5)

*          iparm(11) = timer
*                If timer is a positive integer, CMStab will return
*                timing information in rparm(3)=cm_elapsed and
*                rparm(4)=cm_busy.  CMStab will use the value of
*                timer as the timer to use.

      parameter (timer=1)

*
*          rparm(1) = zeta
*               This is the value used in the stopping test (see
*               iparm(1) = ntest above).

      parameter (zeta=1.e-6)

*
***********************************************************************
*
