bugGNU Octave - Bugs: bug #49950, ode scripts: error on NormControl

 
 

bug #49950: ode scripts: error on NormControl

Submitted by:  Chiara Segala <chiarasegala>
Submitted on:  Thu 29 Dec 2016 04:05:00 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 09 Jan 2017 11:02:04 PM UTC, comment #2:

It doesn't seem like the calculation, when norm was on, was at all correct. The Matlab stopping condition is at http://www.mathworks.com/help/matlab/ref/odeset.html and is

I changed the code to

and checked it in here (http://hg.savannah.gnu.org/hgweb/octave/rev/4b5efc5d52a9).

Rik <rik5>
Project Administrator
Thu 29 Dec 2016 11:38:33 PM UTC, comment #1:

Adding Carlo to the CC list for this bug report. The diagnosis by Chiara looks correct and the if branches need to be flipped in AbsRel_norm.m.

Rik <rik5>
Project Administrator
Thu 29 Dec 2016 04:05:00 PM UTC, original submission:

The help of odeset.m says
"NormControl
Control error relative to the 2-norm of the solution, rather than its
absolute value."
But then does the opposite.
In integrate_adaptive.m:

dt = starting_stepsize (order, func, t, x,
options.AbsTol, options.RelTol,
strcmp (options.NormControl, "on"),
options.funarguments);

in AbsRel_norm.m:

if (normcontrol)
retval = max (abs (x - y) ./ sc);
else
retval = sqrt ((1 / n) * sumsq ((x - y) ./ sc));
endif

It needs to flip the previous "if".

Chiara Segala <chiarasegala>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by chiarasegala (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 09 Jan 2017 11:02:04 PM UTCrik5StatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Thu 29 Dec 2016 11:38:33 PM UTCrik5StatusNone=>In Progress
      Carbon-Copy-=>Added cdf

    Back to the top


    Powered by Savane 3.1-cleanup1