next up previous contents index
Next: Stopping Criterion Up: An Example for a Previous: Setting up the problem

Storage Declarations

The program is set up so that the setting of the three parameters maxn, maxnev, maxncv will automatically declare all of the work space needed to run dsaupd on a given problem.

The declarations allow a problem size of N maxn, computation of nev maxnev eigenvalues, and using at most ncv maxncv Lanczos basis vectors during the IRLM. The user may override the default settings used for the example problem by modifying maxn, maxnev and maxncv in the following parameter statement.

          integer          maxn, maxnev, maxncv, ldv
          parameter       (maxn=256, maxnev=10, maxncv=25, ldv=maxn )

These parameters are used in the code segment listed in Figure 2.3.4 for declaring all of the output and work arrays needed by the ARPACK subroutines dsaupd and dseupd.


  
Figure 2.4: Storage declarations needed for ARPACK subroutine dsaupd
c
c     %--------------%
c     | Local Arrays |
c     %--------------%
c
      Double precision
     &                 v(ldv,maxncv), workl(maxncv*(maxncv+8)),
     &                 workd(3*maxn), d(maxncv,2), resid(maxn),
     &                 ax(maxn)
      logical          select(1)
      integer          iparam(11), ipntr(11)




Chao Yang
11/7/1997