comparison libinterp/corefcn/dasrt.cc @ 20892:c07bee629973

2015 Code Sprint: use ovl ().
author Rik <rik@octave.org>
date Mon, 14 Dec 2015 11:28:48 -0800
parents 1142cf6abc0d
children 6f0bd96f93c0
comparison
equal deleted inserted replaced
20891:95c0d4c07c56 20892:c07bee629973
354 You can use the function @code{dasrt_options} to set optional\n\ 354 You can use the function @code{dasrt_options} to set optional\n\
355 parameters for @code{dasrt}.\n\ 355 parameters for @code{dasrt}.\n\
356 @seealso{dasrt_options, daspk, dasrt, lsode}\n\ 356 @seealso{dasrt_options, daspk, dasrt, lsode}\n\
357 @end deftypefn") 357 @end deftypefn")
358 { 358 {
359 octave_value_list retval; 359 octave_value_list retval (5);
360 360
361 warned_fcn_imaginary = false; 361 warned_fcn_imaginary = false;
362 warned_jac_imaginary = false; 362 warned_jac_imaginary = false;
363 warned_cf_imaginary = false; 363 warned_cf_imaginary = false;
364 364
552 if (jac_name.length ()) 552 if (jac_name.length ())
553 clear_function (jac_name); 553 clear_function (jac_name);
554 554
555 std::string msg = dae.error_message (); 555 std::string msg = dae.error_message ();
556 556
557 retval(4) = msg;
558 retval(3) = static_cast<double> (dae.integration_state ());
559
560 if (dae.integration_ok ()) 557 if (dae.integration_ok ())
561 { 558 {
559 retval(0) = output.state ();
560 retval(1) = output.deriv ();
562 retval(2) = output.times (); 561 retval(2) = output.times ();
563 retval(1) = output.deriv ();
564 retval(0) = output.state ();
565 } 562 }
566 else 563 else
567 { 564 {
568 retval(2) = Matrix ();
569 retval(1) = Matrix ();
570 retval(0) = Matrix ();
571
572 if (nargout < 4) 565 if (nargout < 4)
573 error ("dasrt: %s", msg.c_str ()); 566 error ("dasrt: %s", msg.c_str ());
574 } 567
568 retval(0) = Matrix ();
569 retval(1) = Matrix ();
570 retval(2) = Matrix ();
571 }
572
573 retval(3) = static_cast<double> (dae.integration_state ());
574 retval(4) = msg;
575 575
576 return retval; 576 return retval;
577 } 577 }