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

« back to all changes in this revision

Viewing changes to Lib/integrate/odepack/srcom.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 srcom (rsav, isav, job)
 
2
c-----------------------------------------------------------------------
 
3
c this routine saves or restores (depending on job) the contents of
 
4
c the common blocks ls0001 and eh0001, which are used internally
 
5
c by one or more odepack solvers.
 
6
c
 
7
c rsav = real array of length 218 or more.
 
8
c isav = integer array of length 41 or more.
 
9
c job  = flag indicating to save or restore the common blocks..
 
10
c        job  = 1 if common is to be saved (written to rsav/isav)
 
11
c        job  = 2 if common is to be restored (read from rsav/isav)
 
12
c        a call with job = 2 presumes a prior call with job = 1.
 
13
c-----------------------------------------------------------------------
 
14
      integer isav, job
 
15
      integer ieh, ils
 
16
      integer i, lenils, lenrls
 
17
      double precision rsav,   rls
 
18
      dimension rsav(1), isav(1)
 
19
      common /ls0001/ rls(218), ils(39)
 
20
      common /eh0001/ ieh(2)
 
21
      data lenrls/218/, lenils/39/
 
22
c
 
23
      if (job .eq. 2) go to 100
 
24
c
 
25
      do 10 i = 1,lenrls
 
26
 10     rsav(i) = rls(i)
 
27
      do 20 i = 1,lenils
 
28
 20     isav(i) = ils(i)
 
29
      isav(lenils+1) = ieh(1)
 
30
      isav(lenils+2) = ieh(2)
 
31
      return
 
32
c
 
33
 100  continue
 
34
      do 110 i = 1,lenrls
 
35
 110     rls(i) = rsav(i)
 
36
      do 120 i = 1,lenils
 
37
 120     ils(i) = isav(i)
 
38
      ieh(1) = isav(lenils+1)
 
39
      ieh(2) = isav(lenils+2)
 
40
      return
 
41
c----------------------- end of subroutine srcom -----------------------
 
42
      end