GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ddaslv.f
Go to the documentation of this file.
1  SUBROUTINE ddaslv (NEQ, DELTA, WM, IWM)
2 C***BEGIN PROLOGUE DDASLV
3 C***SUBSIDIARY
4 C***PURPOSE Linear system solver for DDASSL.
5 C***LIBRARY SLATEC (DASSL)
6 C***TYPE DOUBLE PRECISION (SDASLV-S, DDASLV-D)
7 C***AUTHOR PETZOLD, LINDA R., (LLNL)
8 C***DESCRIPTION
9 C-----------------------------------------------------------------------
10 C THIS ROUTINE MANAGES THE SOLUTION OF THE LINEAR
11 C SYSTEM ARISING IN THE NEWTON ITERATION.
12 C MATRICES AND REAL TEMPORARY STORAGE AND
13 C REAL INFORMATION ARE STORED IN THE ARRAY WM.
14 C INTEGER MATRIX INFORMATION IS STORED IN
15 C THE ARRAY IWM.
16 C FOR A DENSE MATRIX, THE LAPACK ROUTINE
17 C DGETRS IS CALLED.
18 C FOR A BANDED MATRIX,THE LAPACK ROUTINE
19 C DGBTRS IS CALLED.
20 C-----------------------------------------------------------------------
21 C***ROUTINES CALLED DGBTRS, DGETRF
22 C***REVISION HISTORY (YYMMDD)
23 C 830315 DATE WRITTEN
24 C 901009 Finished conversion to SLATEC 4.0 format (F.N.Fritsch)
25 C 901019 Merged changes made by C. Ulrich with SLATEC 4.0 format.
26 C 901026 Added explicit declarations for all variables and minor
27 C cosmetic changes to prologue. (FNF)
28 C 020204 Convert to use LAPACK
29 C***END PROLOGUE DDASLV
30 C
31  INTEGER neq, iwm(*)
32  DOUBLE PRECISION delta(*), wm(*)
33 C
34  EXTERNAL dgbtrs, dgetrs
35 C
36  INTEGER lipvt, lml, lmu, lmtype, meband, mtype, npd, info
37  parameter(npd=1)
38  parameter(lml=1)
39  parameter(lmu=2)
40  parameter(lmtype=4)
41  parameter(lipvt=22)
42 C
43 C***FIRST EXECUTABLE STATEMENT DDASLV
44  mtype=iwm(lmtype)
45  go to(100,100,300,400,400),mtype
46 C
47 C DENSE MATRIX
48 100 CALL dgetrs('N', neq, 1, wm(npd), neq, iwm(lipvt), delta, neq,
49  * info)
50  RETURN
51 C
52 C DUMMY SECTION FOR MTYPE=3
53 300 CONTINUE
54  RETURN
55 C
56 C BANDED MATRIX
57 400 meband=2*iwm(lml)+iwm(lmu)+1
58  CALL dgbtrs('N', neq, iwm(lml), iwm(lmu), 1, wm(npd), meband,
59  * iwm(lipvt), delta, neq, inlpck)
60  RETURN
61 C------END OF SUBROUTINE DDASLV------
62  END