开发者

Assigning Values to the Array ipntr in ARPACK

开发者 https://www.devze.com 2023-04-01 05:46 出处:网络
I am trying to figure out how values are assigned to the array called ipntr, which stor开发者_Go百科es pointers, in ARPACK. I am relatively new to fortran and I can\'t figure out exactly how the value

I am trying to figure out how values are assigned to the array called ipntr, which stor开发者_Go百科es pointers, in ARPACK. I am relatively new to fortran and I can't figure out exactly how the values of this array are initially set. The code I am looking at is an unsymmetric driver example dndrv1.f distributed with ARPACK and the portion I am not understanding is as follows

      program dndrv1 

      integer           maxn, maxnev, maxncv, ldv
      parameter         (maxn=256, maxnev=12, maxncv=30, ldv=maxn)
c
c     %--------------%
c     | Local Arrays |
c     %--------------%
c
      integer           iparam(11), ipntr(14)
      logical           select(maxncv)
      Double precision
     &                  ax(maxn), d(maxncv,3), resid(maxn), 
     &                  v(ldv,maxncv), workd(3*maxn), 
     &                  workev(3*maxncv), 
     &                  workl(3*maxncv*maxncv+6*maxncv)
c
c     %---------------%
c     | Local Scalars |
c     %---------------%
c
      character         bmat*1, which*2
      integer           ido, n, nx, nev, ncv, lworkl, info, j,
     &                  ierr, nconv, maxitr, ishfts, mode
      Double precision
     &                  tol, sigmar, sigmai
      logical           first, rvec
c
c     %------------%
c     | Parameters |
c     %------------%
c
      Double precision
     &                  zero
      parameter         (zero = 0.0D+0)
c
c     %-----------------------------%
c     | BLAS & LAPACK routines used |
c     %-----------------------------%
c
      Double precision
     &                  dlapy2, dnrm2
      external          dlapy2, dnrm2, daxpy
c
c     %--------------------%
c     | Intrinsic function |
c     %--------------------%
c
      intrinsic         abs

      write(*,*) ipntr

The result of the write statement is:

1606679396 32767 1606696480 32767 1606918048 32767 0 0 0 0 0 0 0 0

Obviously there is nothing like ipntr(1) = 1606679396 so how have these values been assigned?

Thanks


If the variables aren't assigned anywhere, then their values will be determined by whatever random byte sequence happens to reside in memory. You should see that re-running the program will produce a different output sequence.

0

精彩评论

暂无评论...
验证码 换一张
取 消