octave-maintainers
[Top][All Lists]
Advanced

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

Re: 1D PDE solver for Octave


From: Bill Greene
Subject: Re: 1D PDE solver for Octave
Date: Tue, 5 Jul 2016 09:34:28 -0400

I had included a help file, pde1d.m, in the binary distribution.
I just uploaded this file to https://github.com/wgreene310/pde1d
I included a "demo" at the bottom of this file hoping that the demo
function would find it there; but "demo pde1d" does not work for me.
I looked around for documentation or an example of how to create
a demo for a so-called "builtin" function but could not find one-- e.g.
I see that "demo lsode" doesn't do anything useful.

If there is a trick to doing this, please let me know.

>What class of problems can your code solve?
>How would you invoke your function?
Probably I was a bit vague about this function relative to the MATLAB
pdepe function. As far as problem class, the two main limitations that
I know of compared with pdepe are that it doesn't support complex
coefficients (yet) and does not support the "events" option of pdepe.
Beyond those two limitations, if anyone has an example that "works"
in pdepe but fails in pde1d, I would very much like to see it.

I am currently working on better documentation but it is not yet to the
first draft stage. 

On Mon, Jul 4, 2016 at 6:58 PM, Carlo De Falco <address@hidden> wrote:

On 30 Jun 2016, at 15:54, Carlo De Falco <address@hidden> wrote:

>> I am using the C API to ida; my code is written in C++.
>
> This is the same approach Franceso is using in ode15i/ode15s.


I stand corrected.

Looking at your code I see it is in C++ but it is using the Matlab compatible
MEX API (which is a C API).

This is not what Francesco has been doing.
Francesco is using the Octave C++ API:

https://www.gnu.org/software/octave/doc/interpreter/Oct_002dFiles.html#Oct_002dFiles

"Oct-files are pieces of C++ code that have been compiled with the Octave API into a dynamically loadable object. They take their name from the file which contains the object which has the extension .oct."

The latter is known to be much more efficient.

Apart from that there is not much more I can comment.

Actually whithout a working Makefile and whithout one single line of documentation,
not even a docstring describing input syntax, I sincerely doubt you will ever find anyone
willing to spend more time looking at your code.

Can you provide a least one usage example?
What class of problems can your code solve?
How would you invoke your function?


For example, the attached file shows how to add a docstring and a demo
to your function. Type "help parabolic1d" to see the help and type
"demo parabolic1d" to see the code of the demo and the resulting plot.


c.




reply via email to

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