octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Working on bvp4c


From: Bill Greene
Subject: Re: Working on bvp4c
Date: Mon, 15 Aug 2016 09:09:39 -0400

As a proof-of-concept, I did a quick and dirty C++ implementation of bvp4c.

One of the main purposes was to test the Sundials/Kinsol nonlinear algebraic
solver for this application. In that regard, I would say my experience has been
mixed. My impression is that, even with line search enabled, it is not as effective
at coping with poor initial guesses as MATLAB bvp4c.

This implementation computes a dense jacobian by finite difference (FD). I had hoped to
try FD computation of a sparse jacobian but have not done that yet. But even this
dense jacobian code has better performance than I expected.

The main limitation (that I know of) of my little test code is that it doesn't compute
 discretization errors and refine the mesh; it simply computes a solution with the
input mesh.

If you have any interest in looking at the code, it is here:
https://github.com/wgreene310/bvp1d

Bill Greene 

On Fri, Aug 12, 2016 at 6:56 PM, c. <address@hidden> wrote:

On 6 Aug 2016, at 15:38, lakerluke <address@hidden> wrote:

> Now in order to form the Jacobian terms [1] the paper says they use the
> function numjac to calculate the partial derivatives. I believe Octave does
> not have such a function...
>
> Does anyone know of any equivalent method in octave to numjac? Do you think
> this is something I am going to have to implement first?

There are functions to compute numerical jacobians in the optim package,
I believe the code of one such functions is replicated in ode23s in the
package odepkg to avoid placing a dependency of odepkg on optim.

I highly recommend having an m-file only implementation of bvp4c, at
least as a first step.

c.







reply via email to

[Prev in Thread] Current Thread [Next in Thread]