GSoC ode15s

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

GSoC ode15s

Chiara Segala
Dear all,

I introducing myself for GSOC
2016. I'm Chiara Segala, I'm 23 years old, graduated at University of Verona, Italy. I attended my bachelor's degree in applied mathematics and I am doing now the second year of the master's
degree.
I am interested in the project idea of ODE15S IMPLEMENTATION.
During my bachelor's degree I had a programming
course in java and now I'm following one on the C++ language.
I have
experience in the use of Matlab and Octave thanks to the various courses in numerical computation and
numerical analysis, also advanced.
I
n particular I have followed a course on numerical methods for differential equations, I know and I
have implemented the most common methods, numerical methods for initial value problems, theta-method, explicit and semi-implicit Runge-Kutta, multi-step.
I would be happy to work on that project
.

Thanks,
Best regards
Chiara Segala
Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

rocketsound
Did you read this thread http://octave.1599824.n4.nabble.com/GSoC-2016-project-idea-implementation-of-ode15s-td4675229.html already? Some mailing list members offered their interesst in supporting a student for this specific task. Maybe you introduce yourself in the linked thread.
Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Richard Crozier
In reply to this post by Chiara Segala
On 07/03/16 20:21, Chiara Segala wrote:

> Dear all,*
>
> I introducing myself for GSOC 2016. I'm Chiara Segala, I'm 23 years old,
> graduated atUniversity of Verona, Italy. I attended my bachelor's degree
> in applied mathematics and I am doing now the second year of the
> master's *degree*.
> I am interested in the project idea of ODE15S IMPLEMENTATION.
> During my bachelor's degree I had a programming *course*in java and now
> I'm following one on the C++ language.
> I have experience in theuse of Matlab and Octave thanks to the various
> coursesin numerical computation and *numerical analysis, also advanced.*
> In particular I have followed a course onnumerical methods for
> differential equations, Iknow and I *have implemented the most
> common*methods, numerical methods for initial value problems,
> theta-method, explicit and semi-implicit Runge-Kutta, multi-step.
> I would be happy to work on that project.
>
> *Thanks,
> Best regards
> Chiara Segala

Hi Chiara,

Welcome to the list. I am one of the proposed mentors for this project,
although my role would be helping with general Octave development rather
than numerical methods. If you are interested in applying for this
project consider learning to obtain and build the Octave development
sources as a starting point. You can find a guide to this here:

https://www.gnu.org/software/octave/get-involved.html

but if you need further information you can come back and ask here on
the list. At this point there is still some debate on whether we need an
m-file implementation (in which case you may not need to build Octave at
all), or an interface to another C++ library function. If we decide to
go down the interface route, you will find the following useful:

https://www.gnu.org/software/octave/doc/interpreter/External-Code-Interface.html

You might also want to familiarise yourself with the existing ode
functions, which you can find in the Octave sources here:

http://hg.savannah.gnu.org/hgweb/octave/file/01586012300e/scripts/ode/

Best regards,

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Chiara Segala

Dear Richard,

thank you so much for the advice.

I'm documenting about the project ode15s and I am increasingly interested in it.
I looked at the Matlab documentation of the method, and now I am reading

"The Matlab Ode Suite", Shampine, Reichelt

and

"Solving Index-1 DAEs in Matlab and Simulink", Shampine, Reichelt, Kierzenka

I'm also giving a look at the book

Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems” Hairer, Ernst, Wanner, Gerhard.

Being a math student, I would love to implement the method, then I would prefer an m-file implementation.


Thanks to the availability,
Best regards
Chiara


2016-03-10 14:45 GMT+01:00 Richard Crozier <[hidden email]>:
On 07/03/16 20:21, Chiara Segala wrote:
Dear all,*

I introducing myself for GSOC 2016. I'm Chiara Segala, I'm 23 years old,
graduated atUniversity of Verona, Italy. I attended my bachelor's degree
in applied mathematics and I am doing now the second year of the
master's *degree*.
I am interested in the project idea of ODE15S IMPLEMENTATION.
During my bachelor's degree I had a programming *course*in java and now
I'm following one on the C++ language.
I have experience in theuse of Matlab and Octave thanks to the various
coursesin numerical computation and *numerical analysis, also advanced.*
In particular I have followed a course onnumerical methods for
differential equations, Iknow and I *have implemented the most
common*methods, numerical methods for initial value problems,
theta-method, explicit and semi-implicit Runge-Kutta, multi-step.
I would be happy to work on that project.

*Thanks,
Best regards
Chiara Segala

Hi Chiara,

Welcome to the list. I am one of the proposed mentors for this project, although my role would be helping with general Octave development rather than numerical methods. If you are interested in applying for this project consider learning to obtain and build the Octave development sources as a starting point. You can find a guide to this here:

https://www.gnu.org/software/octave/get-involved.html

but if you need further information you can come back and ask here on the list. At this point there is still some debate on whether we need an m-file implementation (in which case you may not need to build Octave at all), or an interface to another C++ library function. If we decide to go down the interface route, you will find the following useful:

https://www.gnu.org/software/octave/doc/interpreter/External-Code-Interface.html

You might also want to familiarise yourself with the existing ode functions, which you can find in the Octave sources here:

http://hg.savannah.gnu.org/hgweb/octave/file/01586012300e/scripts/ode/

Best regards,

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Richard Crozier
On 10/03/16 17:43, Chiara Segala wrote:
>
> Dear Richard,
>
> thank you so much for the advice.
>

<snip>

>
> Thanks to the availability,
> Best regards
> Chiara
>

You're welcome,

One other thing to mention, on the octave maintainers list it is
requested that we use bottom posting (putting the reply below the
earlier message, like this).

I should also mention I will be going on holiday from the 12th to the
18th March and will be out of email contact, so hopefully one of the
other mentors can continue to assist you in this time.

Regards,

Richard

--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.


Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Marco Caliari-4
In reply to this post by Chiara Segala
On Thu, 10 Mar 2016, Chiara Segala wrote:

>
> Dear Richard,
>
> thank you so much for the advice.
>
> I'm documenting about the project ode15s and I am increasingly interested in it.
> I looked at the Matlab documentation of the method, and now I am reading
>
> "The Matlab Ode Suite", Shampine, Reichelt
>
> and
>
> "Solving Index-1 DAEs in Matlab and Simulink", Shampine, Reichelt, Kierzenka
>
> I'm also giving a look at the book
>
> “Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems” Hairer, Ernst, Wanner, Gerhard.
>
> Being a math student, I would love to implement the method, then I would prefer an m-file implementation.
Dear Chiara,

yesterday Carlo and I gave a closer look to the two papers referenced in
Matlab ode15s documentation. We found out that they only briefly and
roughly describe the algorithm and they refer to quite old papers and
solvers for the details. For instance, they quote DIFSUB, DDRIV2, LSODE,
VODE. We believe it is quite hard for a student (or even for me) to
implement alone and from scratch such a complex function.

Since you would like to implement (also) the behind numerical algorithm,
is there any other function in the Matlab suite, currently missing in
Octave, you would like to take care of? Or any other method for
differential equations?

Cheers,

Marco
Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Chiara Segala

On 11/03/16 13:59, Marco Caliari wrote: 
Dear Chiara,

yesterday Carlo and I gave a closer look to the two papers referenced in Matlab ode15s documentation. We found out that they only briefly and roughly describe the algorithm and they refer to quite old papers and solvers for the details. For instance, they quote DIFSUB, DDRIV2, LSODE, VODE. We believe it is quite hard for a student (or even for me) to implement alone and from scratch such a complex function.

Since you would like to implement (also) the behind numerical algorithm, is there any other function in the Matlab suite, currently missing in Octave, you would like to take care of? Or any other method for differential equations?

Cheers,

Marco


Dear Marco,

I also noticed that there are not many details about the method. I read in

"The Matlab Ode Suite", Shampine, Reichelt

that the code ode15s is a quasi-constant step size implementation in terms of backward differences of the Klopfenstein-Shampine family of NDF's. I tried to read up on this family of methods but I don't find very detailed descriptions. Surely you can judge better than me the difficulty of the work in which we are moving.

As another project idea I would like to work on Exponential Integrators. It could be an idea to implement, for example, the Exponential Euler and Rosenbrock methods. But I don't know if it can be an interesting proposal since these functions are not well defined even in Matlab.

Kind regards,

Chiara

Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Carlo de Falco-2

On 11 Mar 2016, at 19:51, Chiara Segala <[hidden email]> wrote:

> As another project idea I would like to work on Exponential Integrators. It could be an idea to implement, for example, the Exponential Euler and Rosenbrock methods. But I don't know if it can be an interesting proposal since these functions are not well defined even in Matlab.

Chira,

I lke this project proposal, I would be interested in mentoring (or rather co-mentoring) on it.

As you also stated I think it should have lower priority with implementation of ode15s,
because it is not a functionality for which there as much demand.

Definitely an implementation of this feature should go iinto odepkg and not in core-Octave.

That said, I do encourage you to submit an application for GSOC about this.

The first point to investigate before starting development would be what is the state of
algorithms for computing matrix exponential in Octave and how that compares to Matlab.

I know there is another project being considered about matrix functions and I am not fully
aware of its state of advancement but I have seen that discussed on the list recently, I suggest you
look at those discussion threads.

c.
Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Marco Caliari-4
On Sun, 13 Mar 2016, Carlo De Falco wrote:

>
> On 11 Mar 2016, at 19:51, Chiara Segala <[hidden email]> wrote:
>
>> As another project idea I would like to work on Exponential Integrators. It could be an idea to implement, for example, the Exponential Euler and Rosenbrock methods. But I don't know if it can be an interesting proposal since these functions are not well defined even in Matlab.
>
> Chira,
>
> I lke this project proposal, I would be interested in mentoring (or rather co-mentoring) on it.
>
> As you also stated I think it should have lower priority with implementation of ode15s,
> because it is not a functionality for which there as much demand.
>
> Definitely an implementation of this feature should go iinto odepkg and not in core-Octave.
>
> That said, I do encourage you to submit an application for GSOC about this.
>
> The first point to investigate before starting development would be what is the state of
> algorithms for computing matrix exponential in Octave and how that compares to Matlab.
>
> I know there is another project being considered about matrix functions and I am not fully
> aware of its state of advancement but I have seen that discussed on the list recently, I suggest you
> look at those discussion threads.

Dear Chiara,

I like too your idea on exponential integrators and I would be available
as co-mentor. About the other project on matrix functions, it would be
completely different. In fact, in exponential integrators it is required
only the action of the matrix exponential to a vector. To this purpose,
one of the best (fast, reliable) methods available is the one developed by
Nick Higham (Computing the action of the matrix exponential with an
application to exponential integrators). He very recently made his code
available with a free license

https://github.com/higham/expmv

Of course, this is just a small ingredient of an exponential integrators
package. Anyway, I'm pretty sure it does not work in Octave as is. Can you
please verify and fix it (or report what does not work and why)?

Moreover, the two methods you mentioned (exp. Euler and exp.
Rosenbrock-Euler) are very basic methods with no adaptive time step. Can
you find the relevant references for exponential integrators?

Best regards,

Marco

Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Chiara Segala

On 14/03/16 10:58, Marco Caliari wrote:
Dear Chiara,

I like too your idea on exponential integrators and I would be available as co-mentor. About the other project on matrix functions, it would be completely different. In fact, in exponential integrators it is required only the action of the matrix exponential to a vector. To this purpose, one of the best (fast, reliable) methods available is the one developed by Nick Higham (Computing the action of the matrix exponential with an application to exponential integrators). He very recently made his code available with a free license

https://github.com/higham/expmv

Of course, this is just a small ingredient of an exponential integrators package. Anyway, I'm pretty sure it does not work in Octave as is. Can you please verify and fix it (or report what does not work and why)?

Moreover, the two methods you mentioned (exp. Euler and exp. Rosenbrock-Euler) are very basic methods with no adaptive time step. Can you find the relevant references for exponential integrators?

Best regards,

Marco


Dear Carlo and Marco,


thank you for your consideration on my proposal.

I read the discussion about matrix functions and now I look at the Nick Higham code, I'll let you know as soon as possible.

Could you give me some information about how to submit an official application for GSOC about the exponential integrators project?


Thank you,

Best regards


Chiara


Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

PhilipNienhuis
In reply to this post by Marco Caliari-4
Marco Caliari-4 wrote
On Sun, 13 Mar 2016, Carlo De Falco wrote:

>
> On 11 Mar 2016, at 19:51, Chiara Segala <[hidden email]> wrote:
>
>> As another project idea I would like to work on Exponential Integrators. It could be an idea to implement, for example, the Exponential Euler and Rosenbrock methods. But I don't know if it can be an interesting proposal since these functions are not well defined even in Matlab.
>
> Chira,
>
> I lke this project proposal, I would be interested in mentoring (or rather co-mentoring) on it.
>
> As you also stated I think it should have lower priority with implementation of ode15s,
> because it is not a functionality for which there as much demand.
>
> Definitely an implementation of this feature should go iinto odepkg and not in core-Octave.
>
> That said, I do encourage you to submit an application for GSOC about this.
>
> The first point to investigate before starting development would be what is the state of
> algorithms for computing matrix exponential in Octave and how that compares to Matlab.
>
> I know there is another project being considered about matrix functions and I am not fully
> aware of its state of advancement but I have seen that discussed on the list recently, I suggest you
> look at those discussion threads.

Dear Chiara,

I like too your idea on exponential integrators and I would be available
as co-mentor. About the other project on matrix functions, it would be
completely different. In fact, in exponential integrators it is required
only the action of the matrix exponential to a vector. To this purpose,
one of the best (fast, reliable) methods available is the one developed by
Nick Higham (Computing the action of the matrix exponential with an
application to exponential integrators). He very recently made his code
available with a free license

https://github.com/higham/expmv

Of course, this is just a small ingredient of an exponential integrators
package. Anyway, I'm pretty sure it does not work in Octave as is.
Not so fast, please.
Using the test.m supplied with expmv pkg/tarball downloaded from github, I get:

In Matlab r2016a prerelease:

>> test
Relative differences between vectors from EXPM and EXPMV_TSPAN.
Should be of order  1.11e-16.
 1:   0.00e+00
 2:   1.21e-15
 3:   1.37e-15
 4:   1.67e-15
 5:   1.56e-15
 6:   2.59e-15
 7:   1.40e-15
 8:   3.08e-15
 9:   2.20e-15
10:   4.41e-15
>>

and in Octave-4.1.0+:

>> test
Relative differences between vectors from EXPM and EXPMV_TSPAN.
Should be of order 1.11e-016.
 1:  0.00e+000
 2:  2.80e-016
 3:  3.82e-016
 4:  7.54e-016
 5:  6.02e-016
 6:  1.44e-015
 7:  1.48e-015
 8:  1.46e-015
 9:  9.28e-016
10:  2.73e-015
>>

....so I'd say Octave behaves slightly better than the competition :-)

Philip
Reply | Threaded
Open this post in threaded view
|

Re: GSoC ode15s

Marco Caliari-4
On Tue, 15 Mar 2016, PhilipNienhuis wrote:

> Marco Caliari-4 wrote
>> On Sun, 13 Mar 2016, Carlo De Falco wrote:
>>
>>>
>>> On 11 Mar 2016, at 19:51, Chiara Segala &lt;
>
>> segalachiara92@
>
>> &gt; wrote:
>>>
>>>> As another project idea I would like to work on Exponential Integrators.
>>>> It could be an idea to implement, for example, the Exponential Euler and
>>>> Rosenbrock methods. But I don't know if it can be an interesting
>>>> proposal since these functions are not well defined even in Matlab.
>>>
>>> Chira,
>>>
>>> I lke this project proposal, I would be interested in mentoring (or
>>> rather co-mentoring) on it.
>>>
>>> As you also stated I think it should have lower priority with
>>> implementation of ode15s,
>>> because it is not a functionality for which there as much demand.
>>>
>>> Definitely an implementation of this feature should go iinto odepkg and
>>> not in core-Octave.
>>>
>>> That said, I do encourage you to submit an application for GSOC about
>>> this.
>>>
>>> The first point to investigate before starting development would be what
>>> is the state of
>>> algorithms for computing matrix exponential in Octave and how that
>>> compares to Matlab.
>>>
>>> I know there is another project being considered about matrix functions
>>> and I am not fully
>>> aware of its state of advancement but I have seen that discussed on the
>>> list recently, I suggest you
>>> look at those discussion threads.
>>
>> Dear Chiara,
>>
>> I like too your idea on exponential integrators and I would be available
>> as co-mentor. About the other project on matrix functions, it would be
>> completely different. In fact, in exponential integrators it is required
>> only the action of the matrix exponential to a vector. To this purpose,
>> one of the best (fast, reliable) methods available is the one developed by
>> Nick Higham (Computing the action of the matrix exponential with an
>> application to exponential integrators). He very recently made his code
>> available with a free license
>>
>> https://github.com/higham/expmv
>>
>> Of course, this is just a small ingredient of an exponential integrators
>> package. Anyway, I'm pretty sure it does not work in Octave as is.
>
> Not so fast, please.
> Using the test.m supplied with expmv pkg/tarball downloaded from github, I
> get:
>
> In Matlab r2016a prerelease:
>
>>> test
> Relative differences between vectors from EXPM and EXPMV_TSPAN.
> Should be of order  1.11e-16.
> 1:   0.00e+00
> 2:   1.21e-15
> 3:   1.37e-15
> 4:   1.67e-15
> 5:   1.56e-15
> 6:   2.59e-15
> 7:   1.40e-15
> 8:   3.08e-15
> 9:   2.20e-15
> 10:   4.41e-15
>>>
>
> and in Octave-4.1.0+:
>
>>> test
> Relative differences between vectors from EXPM and EXPMV_TSPAN.
> Should be of order 1.11e-016.
> 1:  0.00e+000
> 2:  2.80e-016
> 3:  3.82e-016
> 4:  7.54e-016
> 5:  6.02e-016
> 6:  1.44e-015
> 7:  1.48e-015
> 8:  1.46e-015
> 9:  9.28e-016
> 10:  2.73e-015
>>>
>
> ....so I'd say Octave behaves slightly better than the competition :-)

Right, but try

expmv(1,[1,100;0,-1],[1;1])

Marco