<div dir="ltr">So in that case, would using TotalQuantity to sum up particle information inside 3D container be a bad practice?<div><br></div><div>From</div><div>G.S.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Fri, Dec 20, 2013 at 6:20 PM, John ZuHone <span dir="ltr"><<a href="mailto:jzuhone@gmail.com" target="_blank">jzuhone@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Geoffrey,<br>
<br>
It seems that what is going on here is that whereas the particles in the container are simply the ones contained within the container's cells, the dark matter density is smeared onto the grid using the cloud-in-cell algorithm, meaning that for particles on the edge of their container some of their mass has been smeared onto cells just on the outside, which is a thing that Enzo does.<br>

<br>
So it's not really an apples-to-apples comparison.<br>
<br>
John ZuHone<br>
Laboratory for High-Energy Astrophysics<br>
NASA/Goddard Space Flight Center<br>
8800 Greenbelt Rd., Mail Code 662<br>
Greenbelt, MD 20771<br>
(w) <a href="tel:301-286-2531" value="+13012862531">301-286-2531</a><br>
(m) <a href="tel:781-708-5004" value="+17817085004">781-708-5004</a><br>
<a href="mailto:john.zuhone@nasa.gov">john.zuhone@nasa.gov</a><br>
<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a><br>
<div><div class="h5"><br>
> On Dec 20, 2013, at 9:02 PM, Geoffrey So <<a href="mailto:gsiisg@gmail.com">gsiisg@gmail.com</a>> wrote:<br>
><br>
> Hi all,<br>
><br>
> I found that using a Enzo dataset I was getting slightly different numbers when<br>
> 1) using the list of dark matter particles selected by creation_time < 0.0<br>
><br>
> In [97]: sph_dm = sph['creation_time'] < 0.0<br>
> In [98]: print "%12.12e" % (sph['ParticleMassMsun'][sph_dm]).sum()<br>
> 1.211311468567e+11<br>
><br>
> 2) compared to summing the dark matter particles inside a 3D container with TotalQuantity<br>
><br>
> In [101]: print "%12.12e" % (sph.quantities['TotalQuantity']('Dark_Matter_Density')[0]*vol/Msun)<br>
> 1.188937185993e+11<br>
><br>
> I'm wondering if the field and particles are handled differently when being counted as inside or outside the 3D container?<br>
><br>
> From<br>
> G.S.<br>
</div></div>> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>