[Yt-dev] powmes

Matthew Turk matthewturk at gmail.com
Fri Nov 19 06:39:57 PST 2010


Hi Tom,

Looking over the code, yes, I believe it could be wrapped pretty
straightforwardly.  The main loop seems to be in powmes.f90, in the
routine powmes, and it goes:

input_parms
do_the_job
  read_part
output_results

What I think we could do is override the input_parms function, supply
a slight modification to read_part that simply points the supplied
numpy arrays into the allocatable arrays (memory doubling would
ultimately be a concern, but maybe we can get around that ...) and
then pulls the results back into the main body.

To do this, we could either use a C wrapper, using F/C linkage (Cython
would actually work nicely for this) or we could use something like
f2py.  I'm happy to give either assistance, or have a go at this, but
I don't think I'll get to it before the week after next.  (Although
there is a possibility I could track it down next week.)

What do you think?  I'm actually pretty intrigued by this... it would
be very nice ot have a simple power spectrum generator for the N-body
component.

-Matt


On Fri, Nov 19, 2010 at 6:46 AM, Tom Abel <tabel at slac.stanford.edu> wrote:
>
> Hi All,
>
> what do you think of wrapping
> http://www.projet-horizon.fr/www.projet-horizon.fr/article345.html
> into yt ?
>
> Would this be difficult ?
> I think it potentially would have lots of users, don't you think?
>
> Best,
> Tom
>
>
>
> Tom Abel
> Associate Professor of Physics
> Kavli Institute for Particle Astrophysics and Cosmology, Stanford University
> tabel at stanford.edu
>
>
>
> _______________________________________________
> Yt-dev mailing list
> Yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>



More information about the yt-dev mailing list