Introductions

6 views
Skip to first unread message

Jonathan Leto

unread,
Jul 26, 2008, 4:32:45 PM7/26/08
to Scientfic Computing With Perl
Howdy,

I propose the group members post a short intro about what their
interests and motivations are relating to scientific computing and
Perl. As such, I will take my own medicine first.

My current interests are related to solving differential equations in
particular, nonlinear dynamics in general. I have the Math::ODE module
on CPAN which I think is the simplest interface currently to solve
basic ODE's in Perl. But it is still not easy to use. I would like for
the equations to be input as a human-readable string, i.e. like

y'' + 6 y' - 3 y = 0

instead of the current situation, where they need to be specified as a
list of coderefs. I have vague ideas of use HOP::Parser and/or
Math::Symbolic to accomplish this (since I seem to be too dumb to get
Parse::RecDescent to work correctly), but have nothing concrete to
show for in that direction.

For now, all my time is taken up with hacking on Math::GSL, the
interface to the GNU Scientific Library for the Google Summer of Code
'08.

I would also like to talk about creating a scientific computing
distribution of perl and graphical scientific computing applications

OK, this wasn't that short.

Cheers,

Jonathan

Hugo Cornelis

unread,
Jul 26, 2008, 5:06:27 PM7/26/08
to perl-scienti...@googlegroups.com
Hi,


I am the principal architect and developer of Neurospaces, a neuronal
simulator project for biologically accurate modeling of neuronal
circuits (http://www.neurospaces.org/). Several stand-alone low-level
software components have been developed for the Neurospaces project,
and perl is used to glue those together when running simulations.

For simulation result analysis and graph visualization, I have been
using PDL from Sesa (a simple webserver abstraction layer in perl
available from sourceforge) and for model analysis and visualization I
have been using Gtk2 and perl_SDL, but I am also constanty evaluating
other packages such as the GSL.


Hugo

--
Hugo Cornelis Ph.D.

Research Imaging Center
University of Texas Health Science Center at San Antonio
7703 Floyd Curl Drive
San Antonio, TX 78284-6240

Phone: 210 567 8112
Fax: 210 567 8152

smue...@cpan.org

unread,
Sep 3, 2008, 4:22:07 AM9/3/08
to Scientfic Computing With Perl
Hi Jonathan,

On Jul 26, 10:32 pm, Jonathan Leto <jal...@gmail.com> wrote:
> I propose the group members post a short intro about what their
> interests and motivations are relating to scientific computing and
> Perl. As such, I will take my own medicine first.

allow me introduce myself very briefly in this reply. I'm a physicist
and thus, almost by definition, do scientific computing.
Furthermore, I'm the author of many CPAN modules, including a whole
bunch of math related things.

> My current interests are related to solving differential equations in
> particular, nonlinear dynamics in general. I have the Math::ODE module
> on CPAN which I think is the simplest interface currently to solve
> basic ODE's in Perl. But it is still not easy to use. I would like for
> the equations to be input as a human-readable string, i.e. like
>
> y'' + 6 y' - 3 y = 0
>
> instead of the current situation, where they need to be specified as a
> list of coderefs. I have vague ideas of use HOP::Parser and/or
> Math::Symbolic to accomplish this (since I seem to be too dumb to get
> Parse::RecDescent to work correctly), but have nothing concrete to
> show for in that direction.

I don't think either of the two Math::Symbolic parser implementations
currently supports dashes in the input string. Adding a dash as a
syntax for derivatives would be simple, but with respect to which
variable?

Let me know if or when you need help to use the module as a front-end/
UI for Math::ODE.

> For now, all my time is taken up with hacking on Math::GSL, the
> interface to the GNU Scientific Library for the Google Summer of Code
> '08.

Congratulations on that. I said it before, in a use.perl post, and
I'll say it again: Great work!

Best regards,
Steffen

Steffen Mueller

unread,
Sep 3, 2008, 4:49:38 AM9/3/08
to perl-scienti...@googlegroups.com
Hi again,

small correction:

smue...@cpan.org wrote:
>> y'' + 6 y' - 3 y = 0

[...]


> I don't think either of the two Math::Symbolic parser implementations
> currently supports dashes in the input string.

I didn't mean dashes. I meant the typical y'' syntax above, sorry.

Cheers,
Steffen

Jonathan Leto

unread,
Sep 9, 2008, 3:54:40 AM9/9/08
to perl-scienti...@googlegroups.com
Hello Steffen,

> I don't think either of the two Math::Symbolic parser implementations
> currently supports dashes in the input string. Adding a dash as a
> syntax for derivatives would be simple, but with respect to which
> variable?

I would like to start simple and only deal with ordinary differential
equations, so a notation like:

y''(x) + y(x) = 0

would be a reasonable alternative to

y'' + y = 0

if that is easier to implement. How hard would it be to add either of
these notations to the parser? I prefer the
latter but would be happy with either. Only parsing of linear
equations would be expected.

PS: Thanks for the kind words!

Cheers,

--
[---------------------]
Jonathan Leto
jal...@gmail.com

Steffen Mueller

unread,
Sep 9, 2008, 5:26:14 PM9/9/08
to perl-scienti...@googlegroups.com
Hi Jonathan,

Jonathan Leto wrote:
> I would like to start simple and only deal with ordinary differential
> equations, so a notation like:
>
> y''(x) + y(x) = 0
>
> would be a reasonable alternative to
>
> y'' + y = 0
>
> if that is easier to implement. How hard would it be to add either of
> these notations to the parser? I prefer the
> latter but would be happy with either. Only parsing of linear
> equations would be expected.

Well, Math::Symbolic doesn't do equations at all. But you can use it
just for parsing both sides of an equation:

my @equal = map {parse_from_string($_)} split /=/, $equation;

I just added the capability to parse ' to both parsers. The logic is as
follows:

y'(x) -> partial derivative of y with respect to x
y' -> partial derivative of y, also defaults to deriving wrt x
y'(a, x) -> derive y, wrt a (uses first variable in the signature)
y''(a) -> 2nd order derivative of y, wrt a
...

One might argue that
y'(a, x) should be (d is "del" here):

d/da (d/dx y)
or
d/dx (d/da y)

depending on the properties of y, these are the same, of course.

But I've tried to keep it simple for now.

You can get the code from the svn repository for testing. Actually, I'd
be glad if somebody played around with it because I think it could take
some more testing!

URL: https://math-symbolic.svn.sourceforge.net/svnroot/math-symbolic/trunk

Best regards,
Steffen

P.S: Alas, the docs for this are still TODO...

Reply all
Reply to author
Forward
0 new messages