Re: multidimensional numeric integration code?
From: Julian V. Noble (jvn_at_virginia.edu)
Date: 06/25/04
- Next message: Peter Spellucci: "Re: solve nonlinear eqns"
- Previous message: Julian V. Noble: "Re: Fast solution to very small eigenvalue problem"
- In reply to: Steven G. Johnson: "multidimensional numeric integration code?"
- Next in thread: Steven G. Johnson: "Re: multidimensional numeric integration code?"
- Reply: Steven G. Johnson: "Re: multidimensional numeric integration code?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Jun 2004 12:07:17 -0400
"Steven G. Johnson" wrote:
>
> Hi, can anyone point me to free code for adaptive numeric
> multidimensional integration of a user-specified function over a simple
> "box" domain?
>
> Ideally, I'd like to support semi-infinite integration intervals in at
> least one dimension. e.g. by the QUADPACK trick of transforming f(x) to
> f(a + (1-t)/t)/t^2 and integrating from t=0..1 to get x=a..infinity (but
> with a now-singular integrand).
>
> I searched on Google, and I only found a Fortran ADAPT package by Alan
> Genz. However, I tested this out on a simple Gaussian integral of
> exp(-(x^2 + y^2 + ...)) and found it to be fairly unreliable for this
> kind of strongly-peaked function (which, unfortunately, is the kind of
> function I need to integrate). Integrating from x=0..10, y=0..10,
> etcetera it often misses the peak entirely and gives completely
> erroneous results. On the other hand, I tried the (1-t)/t
> transformation to get a semi-infinite integral, and ADAPT actually then
> seemed to work okay for this Gaussian integral test case, but I'm
> worried because of my problems above that it won't work well for my
> "real" cases.
>
> I also tried simply nesting one-dimensional integrals from QUADPACK, but
> got very poor performance. (Many iterations, and it spends way too much
> time integrating low-amplitude regions because the integrals for each
> dimension are independent.)
>
> I'd be grateful for any pointers to other possible codes to try. Thanks!
>
> Cordially,
> Steven G. Johnson
Try factoring out the Gaussians (or near-Gaussians) in the form
f(x,y,z...) = exp( -ax^2 - by^2 - c z^2 ...) g(x,y,z...)
and using a Gaussian quadrature rule. Depending on what the slowly varying
part, g(x,y,z...) looks like, Gauss-Hermite rules of fairly low order should
work pretty well. At least that has been my experience.
--
Julian V. Noble
Professor Emeritus of Physics
jvn@lessspamformother.virginia.edu
^^^^^^^^^^^^^^^^^^
http://galileo.phys.virginia.edu/~jvn/
"For there was never yet philosopher that could endure the
toothache patiently."
-- Wm. Shakespeare, Much Ado about Nothing. Act v. Sc. 1.
- Next message: Peter Spellucci: "Re: solve nonlinear eqns"
- Previous message: Julian V. Noble: "Re: Fast solution to very small eigenvalue problem"
- In reply to: Steven G. Johnson: "multidimensional numeric integration code?"
- Next in thread: Steven G. Johnson: "Re: multidimensional numeric integration code?"
- Reply: Steven G. Johnson: "Re: multidimensional numeric integration code?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|