~ubuntu-branches/ubuntu/karmic/python-scipy/karmic

« back to all changes in this revision

Viewing changes to Lib/integrate/odepack/aigbt.f

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T. Chen (new)
  • Date: 2005-03-16 02:15:29 UTC
  • Revision ID: james.westby@ubuntu.com-20050316021529-xrjlowsejs0cijig
Tags: upstream-0.3.2
ImportĀ upstreamĀ versionĀ 0.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
      subroutine aigbt (res, adda, neq, t, y, ydot,
 
2
     1                   mb, nb, pw, ipvt, ier )
 
3
clll. optimize
 
4
      external res, adda
 
5
      integer neq, mb, nb, ipvt, ier
 
6
      integer i, lenpw, lblox, lpb, lpc
 
7
      double precision t, y, ydot, pw
 
8
      dimension y(1), ydot(1), pw(1), ipvt(1), neq(1)
 
9
c-----------------------------------------------------------------------
 
10
c this subroutine computes the initial value
 
11
c of the vector ydot satisfying
 
12
c     a * ydot = g(t,y)
 
13
c when a is nonsingular.  it is called by lsoibt for
 
14
c initialization only, when istate = 0 .
 
15
c aigbt returns an error flag ier..
 
16
c   ier  =  0  means aigbt was successful.
 
17
c   ier .ge. 2 means res returned an error flag ires = ier.
 
18
c   ier .lt. 0 means the a matrix was found to have a singular
 
19
c              diagonal block (hence ydot could not be solved for).
 
20
c-----------------------------------------------------------------------
 
21
      lblox = mb*mb*nb
 
22
      lpb = 1 + lblox
 
23
      lpc = lpb + lblox
 
24
      lenpw = 3*lblox
 
25
      do 10 i = 1,lenpw
 
26
 10     pw(i) = 0.0d0
 
27
      ier = 1
 
28
      call res (neq, t, y, pw, ydot, ier)
 
29
      if (ier .gt. 1) return
 
30
      call adda (neq, t, y, mb, nb, pw(1), pw(lpb), pw(lpc) )
 
31
      call decbt (mb, nb, pw, pw(lpb), pw(lpc), ipvt, ier)
 
32
      if (ier .eq. 0) go to 20
 
33
      ier = -ier
 
34
      return
 
35
 20   call solbt (mb, nb, pw, pw(lpb), pw(lpc), ydot, ipvt)
 
36
      return
 
37
c-------------------- end of subroutine aigbt --------------------------
 
38
      end