[vox-tech] ODE solvers in C

Peter Jay Salzman vox-tech@lists.lugod.org
Wed, 10 Jul 2002 14:08:39 -0700


begin Matt Holland <mdholland@ucdavis.edu> 
> 
> Thanks for the warning.  I'll look into that.  Hell, maybe I'll just 
> learn Fortran, I know it can't be that hard... just antiquated and 
> weird, no?
 
you'll be pleasantly surprised.   f90/95 is extremely C like.  in fact,
much of the language (i mean, literally language, not libraries) will
look and feel just like C code.

but with perks.  suppose you have a grid that goes from -a to a.
instead of having an array going from 0 to 2a-1 (barf) or even worse,
an array with a dummy cell at 0 so it goes from 1 to 2a (double barf)
you can actually define arrays that are indexed from -a to a.

and fortran isn't as strongly typed as C.  figuring out what math
function takes what type is just not much of an issue.

> >on using canned code...
> >
> >i didn't mention anything because i want to discourage using other
> >peoples' code (especially when you have no idea what a "good" answer
> >will look like ahead of time).
> 
> I tend to differ with you there.  If there's well-established code that 
> solves a problem, and I can understand the interface to that code, I'm 
> inclined to use it.  The trouble comes when the code is poorly 
> documented

this was the first step in my (admittedly extreme) position.  nothing
was documented even nearly as well as i wanted it to be.  even the C
stuff wasn't well documented.  it was a very odd canned routine that had
a nice interface, well defined parameters and talked about what kinds of
problems the program was suited for.

plus, i initially had an aversion to learning fortran.

so i didn't start out with a good attitude.  you have a much healthier
attitude than i had.  :)

> hasn't been tested sufficiently.  Unfortunately, those may both be 
> problems when it comes to C libraries for numerics, because it seems 
> like most people continue to use Fortran for those sorts of things.  And 
> the old tried and true code is probably much better than anything I 
> could write with out changing my area of specialization.
 
don't sell yourself short.  you're a scientist.  with the right
attitude, a scientist is like a jedi.  we can do anything with the right
frame of mind and a good work ethic.  it's a noble profession; anyone
who's made it this far can do anything he/she sets the mind to.  :)

obi-wan pete