[yt-users] wired square in enzo DM slice map

Matthew Turk matthewturk at gmail.com
Mon Jun 15 17:32:15 PDT 2015


On Mon, Jun 15, 2015 at 7:30 PM, Brian O'Shea <bwoshea at gmail.com> wrote:
>> >>
>> >> yt's "arbitrary_grid" feature might also be useful here.
>> >>
>> >>
>> >>
>> >> http://yt-project.org/docs/dev/analyzing/objects.html?highlight=arbitrary_grid#arbitrary-grid
>> >
>> >
>> >
>> > I concur, though if the size of the grid or number of particles is large
>> > (as
>> > in the simulation I've been working with) this can result in memory
>> > issues.
>> >
>>
>> I'm hesitating to push us further into the weeds here when you've
>> given a very thoughtful and helpful reply to Junhwan, but
>> arbitrary_grid can be flat along one dimension (i.e., NxMx1) and was
>> designed for this use case.
>
>
> Oh, this is intriguing - I stumbled across this when I came up with my
> original (hacktacular) solution, but in my reading of the documentation
> (and, admittedly, a cursory skim of the source code) suggested that if I
> wanted to, say, project the density of *all* of the particles in a
> simulation onto a grid of [NxMx1] that it would not work - I'd only get
> particles that happened to intersect the one-cell-thick volume of that grid,
> which would give me a slice but not a projection.  Did I misread that?  If
> so, it is a much more elegant solution than mine.  :-)

Yup, arbitrary_grid is more flexible than covering_grid.  It accepts
left edge, right edge, *and* dimensions.

-Matt

>
> --Brian
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>



More information about the yt-users mailing list