Mercurial > octave
diff src/DLD-FUNCTIONS/dassl.cc @ 3997:d4091aff6468
[project @ 2002-07-17 18:00:06 by jwe]
author | jwe |
---|---|
date | Wed, 17 Jul 2002 18:00:07 +0000 |
parents | 48d2bc4a3729 |
children | f6df65db67f9 |
line wrap: on
line diff
--- a/src/DLD-FUNCTIONS/dassl.cc Wed Jul 17 16:22:05 2002 +0000 +++ b/src/DLD-FUNCTIONS/dassl.cc Wed Jul 17 18:00:07 2002 +0000 @@ -352,8 +352,24 @@ if (! error_state) { - retval(1) = deriv_output; - retval(0) = output; + std::string msg = dae.error_message (); + + retval(3) = msg; + retval(2) = static_cast<double> (dae.integration_state ()); + + if (dae.integration_ok ()) + { + retval(1) = deriv_output; + retval(0) = output; + } + else + { + retval(1) = Matrix (); + retval(0) = Matrix (); + + if (nargout < 3) + error ("dassl: %s", msg.c_str ()); + } } } else