Mercurial > hg > octave-lyh
comparison liboctave/LSODE.cc @ 461:00f8b2242a18
[project @ 1994-06-06 00:45:57 by jwe]
author | jwe |
---|---|
date | Mon, 06 Jun 1994 00:57:54 +0000 |
parents | 3c23b8ea9099 |
children | 2ca256b77602 |
comparison
equal
deleted
inserted
replaced
460:c45e50c4ee94 | 461:00f8b2242a18 |
---|---|
23 | 23 |
24 #ifdef HAVE_CONFIG_H | 24 #ifdef HAVE_CONFIG_H |
25 #include "config.h" | 25 #include "config.h" |
26 #endif | 26 #endif |
27 | 27 |
28 #if defined (__GNUG__) | |
29 #pragma implementation | |
30 #endif | |
31 | |
28 #include <math.h> | 32 #include <math.h> |
29 #include <float.h> | 33 #include <float.h> |
34 #include <iostream.h> | |
30 | 35 |
31 #include "ODE.h" | 36 #include "ODE.h" |
32 #include "f77-uscore.h" | 37 #include "f77-uscore.h" |
33 #include "lo-error.h" | 38 #include "lo-error.h" |
34 | 39 |
71 { | 76 { |
72 iwork[i] = 0; | 77 iwork[i] = 0; |
73 rwork[i] = 0.0; | 78 rwork[i] = 0.0; |
74 } | 79 } |
75 | 80 |
76 fun = NULL; | 81 fun = 0; |
77 jac = NULL; | 82 jac = 0; |
78 } | 83 } |
79 | 84 |
80 ODE::ODE (int size) | 85 ODE::ODE (int size) |
81 { | 86 { |
82 n = size; | 87 n = size; |
102 { | 107 { |
103 iwork[i] = 0; | 108 iwork[i] = 0; |
104 rwork[i] = 0.0; | 109 rwork[i] = 0.0; |
105 } | 110 } |
106 | 111 |
107 fun = NULL; | 112 fun = 0; |
108 jac = NULL; | 113 jac = 0; |
109 } | 114 } |
110 | 115 |
111 ODE::ODE (const ColumnVector& state, double time, const ODEFunc& f) | 116 ODE::ODE (const ColumnVector& state, double time, const ODEFunc& f) |
112 { | 117 { |
113 n = state.capacity (); | 118 n = state.capacity (); |
192 } | 197 } |
193 | 198 |
194 ColumnVector | 199 ColumnVector |
195 ODE::integrate (double tout) | 200 ODE::integrate (double tout) |
196 { | 201 { |
197 if (jac == NULL) | 202 if (jac) |
203 method_flag = 21; | |
204 else | |
198 method_flag = 22; | 205 method_flag = 22; |
199 else | |
200 method_flag = 21; | |
201 | 206 |
202 integration_error = 0; | 207 integration_error = 0; |
203 | 208 |
204 double *xp = x.fortran_vec (); | 209 double *xp = x.fortran_vec (); |
205 | 210 |