Subject: Initial- and boundary-value problems in Maxima.
From: talon at lpthe.jussieu.fr
Date: Sat, 10 Sep 2011 10:39:23 +0200
Raymond Toy wrote:
>
>
> Could be code rot, but these tests did work at one point, and colnew was
> known to work, even for the more difficult but interesting case of
> restarting a solution from an old solution. I will have to look up some
> old emails and such to find out what happened and how to use it.
>
> Ray
Colnew certainly works in maxima, at least the maxima version i have,
and i have run all the examples with the expected results. For reference
i have used maxima compiled with cmucl and sbcl, i don't have any idea
if other lisps work as well.
I have been lazy during the holidays, i wanted to produce a more automated
version for using colnew under maxima, but instead i went to the beach.
In fact most is written, but as always the last 10% is the harder to
finalize! In the automated version one should provide the equations and
boundary conditions and maxima should provide all the considerable
administrativia that are required by colnew.
Anyways the probi.mac exemplify how to use colnew in a version close to the
original fortran program. Notably the last one (prob3.mac or prob4.mac, i
don't remember solve a case of some complexity, with continuation, etc.).
At the moment, cloning these examples is the way to use colnew, but the
basics are here since several years thanks to Raymond Toy. For this last
example, i have carefully compared the output of fortran colnew and maxima
colnew and can assure that maxima colnew is correct (up to the last couple
of decimals).
Performancewise, unfortunately, maxima colnew is *much* slower than fortran
colnew. One can expect a factor of 100 slower. Raymond and i have measured
the time spent in various parts of the program. The principal part is spent
in the evaluation of the differential equation at the mesh points. Since it
is given in maxima this requires an excursion in maxima land thus is slow.
One cannot do anything about that. The same occurs for similar problems in
maple or mathematica. More worrisome, a non negligible part of the time is
spent in linear algebra computations which should be as fast as in fortran
if lisp was similarly fast as fortran, as some people claim. But in fact
these computations are also 100 times slower than in fortran, while being
pure lisp stuff. Of course this was a major disappointment for me.
Anyways the considered example runs in about 2 mn on my old machine.
So the end of the story is that maxima colnew will be performance impaired,
but it may be *much much* easier to use than the fortran version if an
appropriate wrapper is completed. I agree with the original poster that
colnew is a fantastic program to solve that kind of problems, by far the
best i know.
--
Michel Talon