changeset 3849:5266e351a19c

[project @ 2001-11-02 04:50:09 by jwe]
author jwe
date Fri, 02 Nov 2001 04:50:10 +0000
parents 562c1b1fa5f4
children eff5ec2965aa
files doc/ChangeLog doc/interpreter/Makefile.in libcruft/misc/d1mach-tst.for liboctave/ChangeLog liboctave/DAEFunc.h liboctave/DASSL.cc src/ChangeLog src/DLD-FUNCTIONS/dassl.cc
diffstat 8 files changed, 38 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/doc/ChangeLog	Mon Aug 13 17:26:42 2001 +0000
+++ b/doc/ChangeLog	Fri Nov 02 04:50:10 2001 +0000
@@ -1,3 +1,7 @@
+2001-11-01  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* interpreter/Makefile.in (MAIN_TEXINFO): Look in $(srcdir).
+
 2001-03-27  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* liboctave/Makefile.in (liboctave_toc.html): Use -expand info and
--- a/doc/interpreter/Makefile.in	Mon Aug 13 17:26:42 2001 +0000
+++ b/doc/interpreter/Makefile.in	Fri Nov 02 04:50:10 2001 +0000
@@ -30,7 +30,7 @@
 
 SOURCES := $(SUB_SOURCE)
 
-MAIN_TEXINFO := octave.texi
+MAIN_TEXINFO := $(SRCDIR)/octave.texi
 
 SUB_TEXINFO := $(SUB_SOURCE:.txi=.texi)
 
--- a/libcruft/misc/d1mach-tst.for	Mon Aug 13 17:26:42 2001 +0000
+++ b/libcruft/misc/d1mach-tst.for	Fri Nov 02 04:50:10 2001 +0000
@@ -1,6 +1,7 @@
       program main
       integer i
       double precision d1mach
+      double precision t1, t2
       do 10 i = 1, 5
         print *, d1mach (i)
    10 continue
--- a/liboctave/ChangeLog	Mon Aug 13 17:26:42 2001 +0000
+++ b/liboctave/ChangeLog	Fri Nov 02 04:50:10 2001 +0000
@@ -1,3 +1,9 @@
+2001-10-08  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* DASSL.cc (ddassl_f): Handle IRES returned from user supplied
+	function.
+	* DAEFunc.h (DAERHSFunc): Add IRES to prototype.
+
 2001-06-07  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* dMatrix.cc (Matrix::inverse, Matrix::solve, Matrix::determinant,
--- a/liboctave/DAEFunc.h	Mon Aug 13 17:26:42 2001 +0000
+++ b/liboctave/DAEFunc.h	Fri Nov 02 04:50:10 2001 +0000
@@ -38,7 +38,8 @@
     };
 
   typedef ColumnVector (*DAERHSFunc) (const ColumnVector& x,
-				      const ColumnVector& xdot, double); 
+				      const ColumnVector& xdot,
+				      double, int&); 
 
   typedef DAEJac (*DAEJacFunc) (const ColumnVector& x,
 				const ColumnVector& xdot, double);
--- a/liboctave/DASSL.cc	Mon Aug 13 17:26:42 2001 +0000
+++ b/liboctave/DASSL.cc	Fri Nov 02 04:50:10 2001 +0000
@@ -145,14 +145,17 @@
       tmp_state.elem (i) = state [i];
     }
 
-  tmp_delta = user_fun (tmp_state, tmp_deriv, time);
+  tmp_delta = user_fun (tmp_state, tmp_deriv, time, ires);
 
-  if (tmp_delta.length () == 0)
-    ires = -2;
-  else
+  if (ires >= 0)
     {
-      for (int i = 0; i < nn; i++)
-	delta [i] = tmp_delta.elem (i);
+      if (tmp_delta.length () == 0)
+	ires = -2;
+      else
+	{
+	  for (int i = 0; i < nn; i++)
+	    delta [i] = tmp_delta.elem (i);
+	}
     }
 
   return 0;
@@ -220,7 +223,9 @@
 
   if (! sanity_checked)
     {
-      ColumnVector res = (*user_fun) (x, xdot, t);
+      int ires = 0;
+
+      ColumnVector res = (*user_fun) (x, xdot, t, ires);
 
       if (res.length () != x.length ())
 	{
--- a/src/ChangeLog	Mon Aug 13 17:26:42 2001 +0000
+++ b/src/ChangeLog	Fri Nov 02 04:50:10 2001 +0000
@@ -1,3 +1,8 @@
+2001-10-08  John W. Eaton  <jwe@bevo.che.wisc.edu>
+
+	* DLD-FUNCTIONS/dassl.cc (dassl_user_function): Allow user
+	supplied RES function to return IDID as second value.
+
 2001-07-23  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
 	* parse.y: Clear help_buf after documenting function.
--- a/src/DLD-FUNCTIONS/dassl.cc	Mon Aug 13 17:26:42 2001 +0000
+++ b/src/DLD-FUNCTIONS/dassl.cc	Fri Nov 02 04:50:10 2001 +0000
@@ -50,7 +50,8 @@
 static int call_depth = 0;
 
 ColumnVector
-dassl_user_function (const ColumnVector& x, const ColumnVector& xdot, double t)
+dassl_user_function (const ColumnVector& x, const ColumnVector& xdot,
+		     double t, int& ires)
 {
   ColumnVector retval;
 
@@ -95,10 +96,14 @@
 	  return retval;
 	}
 
-      if (tmp.length () > 0 && tmp(0).is_defined ())
+      int tlen = tmp.length ();
+      if (tlen > 0 && tmp(0).is_defined ())
 	{
 	  retval = ColumnVector (tmp(0).vector_value ());
 
+	  if (tlen > 1)
+	    ires = tmp(1).int_value ();
+
 	  if (error_state || retval.length () == 0)
 	    gripe_user_supplied_eval ("dassl");
 	}