If you check out the IsBound function in derived quantities, the work is done by a c function in PointCombine.c that accepts a list of x, y, z, and mass.  It should be simple to write something to throw particle lists instead of cell lists.  It's not the fastest thing in the world, as there are (N^2 - N)/2 operations.  Matt has also implemented a version that uses the CUDA libraries and works on the gpu and is significantly faster.

I haven't seen any objections to removing the extra factor of 2 in front of the potential energy.  I'm going to do that now.

Britton

On Sat, Jan 17, 2009 at 9:59 PM, Stephen Skory <stephenskory@yahoo.com> wrote:
> I (reluctantly?) agree with Britton that there's an error.  He's going
to fix it, unless somebody speaks now.  (Else, holding peace forever is
expected.)

I give up none of my rights!

IsBound interests me. What would be the best way to make this work with HOP haloes? Put a kind of wrapper in the HopGroup class that cuts out a sphere centered on .center_of_mass() with radius .maximum_radius()? I'd prefer to only operate on the DM particles, not the gas mass. Any suggestions?

Thanks!

 _______________________________________________________
sskory@physics.ucsd.edu           o__  Stephen Skory
http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
________________________________(_)_\(_)_______________
_______________________________________________
Yt-dev mailing list
Yt-dev@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org