patchGNU Octave - Patches: patch #8979, Add two functions to check and set...

 
 

patch #8979: Add two functions to check and set ODE options

Submitted by:  Francesco Faccio <francesco_faccio>
Submitted on:  Thu 14 Apr 2016 09:17:41 PM UTC  
 
Category:  Core : new function Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

( Jump to the original submission)

Thu 17 Nov 2016 08:55:36 AM UTC, comment #7: 

These functions were completely superseded by recent
changes released with 4.2

Carlo de Falco <cdf>
Project Member
Thu 10 Nov 2016 05:28:46 PM UTC, comment #6: 

Is this patch still relevant?  The 4.2.0 release should come out very soon and odeget, odeset, ode23, and ode45 have all been reviewed and modified extensively.

Rik <rik5>
Project Administrator
Thu 07 Jul 2016 07:10:38 AM UTC, comment #5: 

This is not the main topic of the GSOC but an intermediate byproduct that should be done ASAP.

I really care of getting implementations of the new ode functions
(ode45, ode23, odeset, odeget) complete before 4.2 as I think for many users they can be considered the most notable feature in the new release.

Carlo de Falco <cdf>
Project Member
Thu 07 Jul 2016 07:06:16 AM UTC, comment #4: 

Thanks for the explanations, Carlo.

The fact that this is an ongoing GSOC project means it is probably not for 4.2.0, which answers my main question.

No, private functions usually don't have tests, but there was talk of enabling them (bug #38776).  The xtest that you mentioned is probably enough; I didn't realise the patches related to that.

Lachlan Andrew <lachlan>
Thu 07 Jul 2016 06:57:15 AM UTC, comment #3: 

Lachlan,

1. These functions are meant to be private,
there should be no visible effect to the
user except for a fix to the following xtest
in odeset:

## FIXME: xtest currently fails as there are two extra options to control
##        fixed step integration options.
%!xtest
%! odeoptA = odeset ();
%! assert (isstruct (odeoptA));
%! assert (numfields (odeoptA), 23);
%! assert (all (structfun ("isempty", odeoptA)));

the main reason for the patch is an internal refactoring
that allows avoiding code duplication in odesuite drivers

2. I don't think private functions usually have tests, do they?
How can make check run those tests?

3. I and Jacopo discussed yesterday with Francesco, odeset
can be highly simplified by using the inputParser class,
which should also affect this patch. Francesco is going
to this as the next assignment in his GSOC project.

c.

Carlo de Falco <cdf>
Project Member
Wed 06 Jul 2016 01:23:59 PM UTC, comment #2: 

Would the two of you like to get this into Release 4.2.0?

If so, please:
1. Explain concisely why this patch is necessary.  How is the user affected?
2. Write some test cases.
3. Form a single changeset that adds the functionality, including changes to module.mk, rather than having a changeset to rename the private file.

Let me know if you would like help with any of that.

Lachlan Andrew <lachlan>
Thu 28 Apr 2016 04:57:10 PM UTC, comment #1: 

I added a patch to fix an inconsistency in the function names and to add the new functions to the list of private functions in ode/module.mk

Everything seems to be working fine

(file #37011)

Jacopo Corno <jcorno>
Thu 14 Apr 2016 09:17:41 PM UTC, original submission:  

These functions are a starting point for checking options and filling the option structure of a generic ODE solver.

The first private function I have prepared is check_input.m:

[fun, trange, init, odeopts] = check_input (fun, trange, init, solver, varargin)

that checks the correctness of the input and returns an option struct.

The second function is set_ode_options.m:

[fun, odeopts] = set_ode_options (fun, trange, init, odeopts, order, solver, default_input)

that checks if options which are not allowed are passed, sets the default options and fills the option struct.

default_input is a struct that at the beginning of each solver has to be filled in order to specify which options are allowed and, if they are allowed, which are their default values.
I have modified the code of ode23 and ode45 to use these two common private functions.

I would like to receive some suggestions in order to make these functions more generic. I have removed the possibility of integrating using integrate_n_step and integrate_const: only the adaptive integration is allowed (I made this decision because I don't see a particular advantage using these methods and because there's no Matlab incompatibility).

I would like also to write a private function that handles postprocessing, stats and event detection for each solver.
Do you think it could be useful?

Francesco Faccio <francesco_faccio>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #37011:  21665.patch added by jcorno (7KiB - text/x-patch - added new functions to ode/module.mk and fix function name)
file #36928:  changeset.zip added by francesco_faccio (10KiB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by cdf (Posted a comment)
  • -email is unavailable- added by lachlan (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
  • -email is unavailable- added by francesco_faccio
  • -email is unavailable- added by francesco_faccio
  • -email is unavailable- added by francesco_faccio
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 11 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-17 cdf StatusNeed Info => Done
        Open/ClosedOpen => Closed
    2016-11-10 rik5 StatusNone => Need Info
    2016-07-07 lachlan CategoryNone => Core : new function
    2016-04-28 jcorno Attached File- => Added 21665.patch, #37011
    2016-04-14 francesco_faccio Attached File- => Added changeset.zip, #36928
        Carbon-Copy- => Added carlo.defalco@polimi.it
        Carbon-Copy- => Added marco.caliari@univr.it
        Carbon-Copy- => Added jacopo.corno@gmail.com
        Carbon-Copy- => Added r.crozier@ed.ac.uk
        Carbon-Copy- => Added schoeps@temf.tu-darmstadt.de

    Back to the top


    Powered by Savane 3.5