patchGNU Octave - Patches: patch #9069, Refactor ode option check

 
 

patch #9069: Refactor ode option check

Submitter:  Francesco Faccio <francesco_faccio>
Submitted:  Wed 03 Aug 2016 11:54:57 PM UTC
   
 
Category:  Core : other Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Discussion locked!

Thu 17 Nov 2016 08:43:53 AM UTC, comment #1: 

option management in Octave core has been completely reworked
in the 4.2 release, superseding this change.

Carlo de Falco <cdf>
Group Member
Wed 03 Aug 2016 11:54:57 PM UTC, original submission:  

Hello!

I wrote a patch for refactoring the option check for a generic ode solver and I have applied it to ode23 and ode45.

In this patch 2 new functions have been added:

[defaults, classes, attributes] = odedefaults (n, t0, tf)

which sets default options of a generic solver in structure defaults and sets which classes and attributes to test for each field

options = odemergeopts  (useroptions, options, classes,
                         attributes, fun_name);

which tests the struct provided by the user and overwrites the default structure. This function uses validateattributes or validatestring for all the checks and it does more than ode_struct_value_check, that will be no more used.

As a consequence, xtest failing in odeset is now successful and there is the possibility to add new special fields inside odeset.

I removed fields TimeStepNumber and TimeStepSize from file known_option_names.m, because they are not standard fields. I decided to remove them also inside ode23 and ode45 and to use only adaptive integration for Matlab compatibility (but if it's a bad choice I can add them again).

Due to these changes, I removed from ode23 and ode45 the test regarding TimeStepSize and the test for new fields in an ode struct.

Should I write the documentation in the private functions or explain their usage in Octave manual?

Please, tell me if there is something I can change.

Cheers,

Francesco




Francesco Faccio <francesco_faccio>

 

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

Attached Files
file #38098:  refact_ode.diff added by francesco_faccio (39KiB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by francesco_faccio (Submitted the item)
  • -email is unavailable- added by francesco_faccio
  • -email is unavailable- added by francesco_faccio
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-17 cdf StatusNone Done
        Open/ClosedOpen Closed
        Discussion LockNone Locked
    2016-08-03 francesco_faccio Attached File- Added refact_ode.diff, #38098
        Carbon-Copy- Added -email is unavailable-
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code