Blame view

fvn_fnlib/inits.f 861 Bytes
38581db0c   daniau   git-svn-id: https...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
        function inits (os, nos, eta)
  c april 1977 version.  w. fullerton, c3, los alamos scientific lab.
  c
  c initialize the orthogonal series so that inits is the number of terms
  c needed to insure the error is no larger than eta.  ordinarily, eta
  c will be chosen to be one-tenth machine precision.
  c
  c             input arguments --
  c os     array of nos coefficients in an orthogonal series.
  c nos    number of coefficients in os.
  c eta    requested accuracy of series.
  c
        dimension os(nos)
  c
        if (nos.lt.1) call seteru (
       1  35hinits   number of coefficients lt 1, 35, 2, 2)
  c
        err = 0.
        do 10 ii=1,nos
          i = nos + 1 - ii
          err = err + abs(os(i))
          if (err.gt.eta) go to 20
   10   continue
  c
   20   if (i.eq.nos) call seteru (28hinits   eta may be too small, 28,
       1  1, 2)
        inits = i
  c
        return
        end