diff liboctave/LSODE.cc @ 4180:84fe3ca3a246

[project @ 2002-11-15 04:47:01 by jwe]
author jwe
date Fri, 15 Nov 2002 04:47:02 +0000
parents 47d3baea432d
children 5719210fff4c
line wrap: on
line diff
--- a/liboctave/LSODE.cc	Thu Nov 14 04:31:19 2002 +0000
+++ b/liboctave/LSODE.cc	Fri Nov 15 04:47:02 2002 +0000
@@ -35,6 +35,7 @@
 #include "f77-fcn.h"
 #include "lo-error.h"
 #include "lo-sstream.h"
+#include "quit.h"
 
 typedef int (*lsode_fcn_ptr) (const int&, const double&, double*,
 			      double*, int&);
@@ -57,6 +58,8 @@
 lsode_f (const int& neq, const double& time, double *,
 	 double *deriv, int& ierr) 
 {
+  BEGIN_INTERRUPT_WITH_EXCEPTIONS;
+
   ColumnVector tmp_deriv;
 
   // NOTE: this won't work if LSODE passes copies of the state vector.
@@ -73,6 +76,8 @@
 	deriv [i] = tmp_deriv.elem (i);
     }
 
+  END_INTERRUPT_WITH_EXCEPTIONS;
+
   return 0;
 }
 
@@ -80,6 +85,8 @@
 lsode_j (const int& neq, const double& time, double *,
 	 const int&, const int&, double *pd, const int& nrowpd)
 {
+  BEGIN_INTERRUPT_WITH_EXCEPTIONS;
+
   Matrix tmp_jac (neq, neq);
 
   // NOTE: this won't work if LSODE passes copies of the state vector.
@@ -92,6 +99,8 @@
     for (int i = 0; i < neq; i++)
       pd [nrowpd * j + i] = tmp_jac (i, j);
 
+  END_INTERRUPT_WITH_EXCEPTIONS;
+
   return 0;
 }