This is the mail archive of the gsl-discuss@sources.redhat.com mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: two-dimensional integration



Well, I guess I had already started that route.  I
wrote a function modeled on the 1d fourier routine
in gsl. It takes two of each workspace, two
tables, etc.  Then it uses one of each thing in
the outer integration and passes the others via a
param struct to the inner routine. I haven't
started testing it.

This approach seems to be used often enough, but
its probably not the best. We are trying to rush a
paper out so I just need something that works for
now.  I have something cobbled together out of
numerical recipes, but is not reliable everywhere,
and I want to post the code used in the paper so
GPL'd code is better.

I checked out this person's routines,
http://www.sci.wsu.edu/math/faculty/genz/homepage

But they are in fortran. They are probably better
routines-- state of the art.  If I had more time,
I would write C drivers for them.

If anyone has any other tips, I'd appreciate it.
Thanks,
John

*Brian Gough wrote:
> John Lapeyre writes:
>  > Greetings, I need to do fourier integrals in two dimensions. Does
>  > anyone have code implementing this, or something similar ?  I have
>  > not used the library yet. I was planning on expanding cos(kx +
>  > k'x') into products of sines and cosines and somehow using the 1-d
>  > routines in a nested fashion. I guess the 1-d routines in this case
>  > need to be, ... what is the word ..., re-entrant?  Has anyone had
>  > experience with this ?  Thanks,
> 
> The GSL integration routines can be nested, by passing additional
> workspace through the void * params argument.  I wouldn't necessarily
> recommend it as a good way to compute a 2-d integral though.
> 
> Brian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]