diff liboctave/DASSL.cc @ 289:c23f50e61c58

[project @ 1994-01-13 06:25:58 by jwe]
author jwe
date Thu, 13 Jan 1994 06:26:54 +0000
parents e592734b002b
children 3c23b8ea9099
line wrap: on
line diff
--- a/liboctave/DASSL.cc	Thu Jan 13 03:29:16 1994 +0000
+++ b/liboctave/DASSL.cc	Thu Jan 13 06:26:54 1994 +0000
@@ -75,9 +75,6 @@
   n = size;
   t = 0.0;
 
-  absolute_tolerance = 1.0e-6;
-  relative_tolerance = 1.0e-6;
-
   stop_time_set = 0;
   stop_time = 0.0;
 
@@ -105,9 +102,6 @@
   x = state;
   xdot.resize (n, 0.0);
 
-  absolute_tolerance = 1.0e-6;
-  relative_tolerance = 1.0e-6;
-
   stop_time_set = 0;
   stop_time = 0.0;
 
@@ -144,9 +138,6 @@
   xdot = deriv;
   x = state;
 
-  absolute_tolerance = 1.0e-6;
-  relative_tolerance = 1.0e-6;
-
   stop_time_set = 0;
   stop_time = 0.0;
 
@@ -279,6 +270,25 @@
   else
     info [3] = 0;
 
+  double abs_tol = absolute_tolerance ();
+  double rel_tol = relative_tolerance ();
+
+  if (initial_step_size () >= 0.0)
+    {
+      rwork[2] = initial_step_size ();
+      info[7] = 1;
+    }
+  else
+    info[7] = 0;
+
+  if (maximum_step_size () >= 0.0)
+    {
+      rwork[2] = maximum_step_size ();
+      info[6] = 1;
+    }
+  else
+    info[6] = 0;
+
   double dummy;
   int idummy;
 
@@ -291,9 +301,8 @@
  again:
 
   F77_FCN (ddassl) (ddassl_f, &n, &t, px, pxdot, &tout, info,
-		    &relative_tolerance, &absolute_tolerance, &idid,
-		    rwork, &lrw, iwork, &liw, &dummy, &idummy,
-		    ddassl_j);
+		    &rel_tol, &abs_tol, &idid, rwork, &lrw, iwork,
+		    &liw, &dummy, &idummy, ddassl_j);
 
   switch (idid)
     {
@@ -475,3 +484,10 @@
 
   return retval;
 }
+
+/*
+;;; Local Variables: ***
+;;; mode: C++ ***
+;;; page-delimiter: "^/\\*" ***
+;;; End: ***
+*/