[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bvp4c.m Question
From: |
Jochen Broecker |
Subject: |
Re: bvp4c.m Question |
Date: |
Thu, 18 Apr 2013 10:03:35 +0100 (BST) |
User-agent: |
Alpine 2.02 (DEB 1266 2009-07-14) |
Hi Carlo,
As I pointed out in a previous (off-list) email bvp4c is not really functional
yet, its
only use at the moment can be seen as that of a starting point for someone
interested
in completing its implementation.
Ok, I might have misunderstood. But thanks for clarification. The rest of
your email was indeed helpful.
Indeed there is a proposal to have a student to complete the implementation of
bvp4c
within the GSoC 2013 program:
http://wiki.octave.org/Summer_of_Code_Project_Ideas#Implement_solver_for_1D_nonlinear_boundary_value_problems
If you know any interested students please encourage them to apply.
Will check.
As things stand now, you definitely should not recommend the use of bvp4c in a
"production" environment.
Ok.
If you can rewrite your problem as a 2nd order equation it is very likely that
you can solve it
with a combination of the bim package and fsolve.
If you want info on how to do this you should write a less abstract, yet not
too complicated,
example of what you really intend to solve.
Ok. One of the problems is that I need to install octave 3.6 while
standard distributions seem to supply only 3.2 (I know this is dummy
stuff)
Questions:
(1) My vector field has dimension 2*n, but bvp4c tries to evaluate it using
a 2*n-times-3 matrix. Am I supposed to return the values of the vector field
for each column of this 2*n-times-3 matrix? If yes, why 3? Can I tweak this
number? My problem allows for massive economies in terms of evaluating the
vector field at more than one point, but the number of points should
preferrably be even.
I'm not really sure what you're really talking about here.
The size of the matrix depends on the number of stages in
RK methods used by bvp4c, there's not really much you can do
about this.
why do you think you need to change this? can that be done in matlab's bvp4c?
how?
Ok, I see now why this happens. I had the impression that matlab tries to
evaluate my vector field at only one point at a time. But as I said, I
don't really care about 100% compatibility with matlab. I just need to
know how I'd have to structure my code.
(2) How do I provide derivatives of my boundary conditions and vector field?
(I want to demonstrate to people that this improves the performance.)
how do you do that with matlab's bvp4c? you should be able to do the same with
Octave's
implementation, if it doesn't work it's because it's not implemented yet,
patches are welcome.
Ok. In order to contribute (which I am happy to), I would have to look at
the code more carefully. Please don't expect any patches in the near
future.
In fact, I thought you SHOULD be able to provide derivatives in matlab,
but in practice, it did not work with matlab either.
(3) I believe that bvp4c solves the collocation equations using fsolve. I'd
like to extract more information about the collocation equations at the
solution from fsolve (e.g. the Jacobian), but in order to interprete this
information, I need to know precisely how the collocation equations are
organised.
the discretization method is an implicit 3-stage Runge-Kutta method whos
butcher tableau
is given by the persistent variables A, B and C defined in the code.
what the current code does is just set up the whole non linear system of
equations at
all the collocation points and then let it to fsolve to solve the system.
(4) Am I right in thinking that bvp4c is a fourth order scheme, so that
there is an implicit assumption that (x, p) have temporal derivatives of up
to order 4?
you can find a discussion of the convergence properties of the method in this
paper:
http://dx.doi.org/10.1145/502800.502801
Good, I know that paper (more or less).
Let me think about your suggestions. And I'll cook up a simple example.
Thanks a lot,
JOchen