diff liboctave/DASPK.cc @ 3995:ee0304212be0

[project @ 2002-07-17 04:32:42 by jwe]
author jwe
date Wed, 17 Jul 2002 04:32:42 +0000
parents 48d2bc4a3729
children 98107d72871c
line wrap: on
line diff
--- a/liboctave/DASPK.cc	Tue Jul 16 23:57:09 2002 +0000
+++ b/liboctave/DASPK.cc	Wed Jul 17 04:32:42 2002 +0000
@@ -64,9 +64,6 @@
 
 DASPK::DASPK (void) : DAE ()
 {
-  stop_time_set = 0;
-  stop_time = 0.0;
-
   sanity_checked = 0;
 
   info.resize (15);
@@ -80,9 +77,6 @@
 {
   n = size ();
 
-  stop_time_set = 0;
-  stop_time = 0.0;
-
   sanity_checked = 0;
 
   info.resize (20);
@@ -97,9 +91,6 @@
 {
   n = size ();
 
-  stop_time_set = 0;
-  stop_time = 0.0;
-
   DAEFunc::set_function (f.function ());
   DAEFunc::set_jacobian_function (f.jacobian_function ());
 
@@ -111,26 +102,6 @@
     info.elem (i) = 0;
 }
 
-void
-DASPK::force_restart (void)
-{
-  restart = 1;
-  integration_error = 0;
-}
-
-void
-DASPK::set_stop_time (double tt)
-{
-  stop_time_set = 1;
-  stop_time = tt;
-}
-
-void
-DASPK::clear_stop_time (void)
-{
-  stop_time_set = 0;
-}
-
 int
 ddaspk_f (const double& time, const double *state, const double *deriv,
 	  const double&, double *delta, int& ires, double *, int *)
@@ -207,7 +178,7 @@
 
   if (restart)
     {
-      restart = 0;
+      restart = false;
       info.elem (0) = 0;
     }
 
@@ -229,7 +200,7 @@
   if (rwork.length () != lrw)
     rwork.resize (lrw);
 
-  integration_error = 0;
+  integration_error = false;
 
   if (DAEFunc::jacobian_function ())
     info.elem (4) = 1;
@@ -254,7 +225,7 @@
 	  (*current_liboctave_error_handler)
 	    ("daspk: inconsistent sizes for state and residual vectors");
 
-	  integration_error = 1;
+	  integration_error = true;
 	  return retval;
 	}
 
@@ -304,7 +275,7 @@
 
   if (f77_exception_encountered)
     {
-      integration_error = 1;
+      integration_error = true;
       (*current_liboctave_error_handler) ("unrecoverable error in daspk");
     }
   else
@@ -346,7 +317,7 @@
 		  // and control is returned to the calling program. For
 		  // example, this occurs when invalid input is detected.
 	default:
-	  integration_error = 1;
+	  integration_error = true;
 	  break;
 	}
     }
@@ -505,6 +476,21 @@
   return retval;
 }
 
+std::string
+DASPK::error_message (void) const
+{
+  std::string retval;
+
+  switch (idid)
+    {
+    default:
+      retval = "unknown error state";
+      break;
+    }
+
+  return retval;
+}
+
 /*
 ;;; Local Variables: ***
 ;;; mode: C++ ***