Anyone have a "little" shooting-method function to share
David L Goldsmith
David.L.Goldsmith at noaa.gov
Wed Nov 8 15:49:00 CST 2006
Hi! I need to numerically solve:
(1-t)x" + x' - x = f(t), x(0) = x0, x(1) = x1
I've been trying to use (because it's the approach I inherited) an
elementary finite-difference discretization, but unit tests have shown
that that approach isn't working. After a little review, I believe I
understand the problem: near t=0, the thing is like an
advection-diffusion equation with diffusion as strong as advection (a
case I'm sure is treated somewhere in the literature, but not as easily
findable as:) near t=1, the thing is like the advection-diffusion
equation I did easily find treated, namely one where advection
dominates. Based on that treatment, I understand why an FD approach
(with a uniform grid) would fail around t=0, and from there it is easy
to accept that the fact that the thing changes its "nature" over the
course of its "life," implies that (a uniform grid) FD is probably not a
very good approach for this equation anywhere on its domain. I could
try (and maybe will have to) a variable grid FD approach, but I'd first
like to try a "shooting" method (for some reason my intuition is telling
me that in this case this might be more efficient). This is where you
all come in: I understand the algorithm and could (may have to) code it
myself, but if anyone out there already has code for this (in Python
using numpy, and preferably already under test), might you be willing to
share? Thanks in advance,
David Goldsmith
--
HMRD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Numpy-discussion
mailing list