[yt-users] covering grid

Matthew Turk matthewturk at gmail.com
Fri Apr 8 18:20:09 PDT 2011


Hi John,

Sorry to reply to my own email.  On reflection, you *may* be able to
use the BinnedProfile3D class, binning on x,y,z, to accomplish this.
However, this comes with a few caveats.

The BinnedProfile3D class at most places a value into a single bin
along all three dimensions.  What this means is that if you have a
coarse cell that would span multiple cells, it would only be placed
into one.  I'd recommend that you test this with the BinnedProfile2D,
where you bin up an entire domain along x,y,z, at some relatively high
resolution -- the image will come out all crazy, because each cell is
regarded as a point rather than an extended source.

But, if your desired output is *coarser* than the coarsed zone (i.e.,
it's *appropriate* for the coarsest zone in the simulation to be
placed into only a single bin) then this should work.

It might also be possible, thinking back on it, to add in an
additional routine for filling child zones.  You'd use the existing
machinery as is, but when the fill call into the 3D buffer hits the
finest level allowed, it would instead continue on and take the
weighted average of its children.  This would be an additional call in
_get_data_from_grid in AMRCoveringGridBase.

-Matt

On Fri, Apr 8, 2011 at 8:34 PM, Matthew Turk <matthewturk at gmail.com> wrote:
> Hi John,
>
> I think you may be able to use the functionality that's in the C
> routine I directed David to a few days ago.  Right now it blocks out
> child-masked zones when it hits the finest level requested; you could
> modify this to instead average them.  I can give suggestions, but I
> think it might be a bit more than I can commit to right now to
> implement this directly.
>
> -Matt
>
> On Fri, Apr 8, 2011 at 3:57 PM, John ZuHone <jzuhone at cfa.harvard.edu> wrote:
>> I'd like to make a covering grid equivalent where the cells of the grid contain averages. Is there some other functionality that I can use for this, or do I need to write it from scratch?
>>
>> Best,
>>
>> John
>>
>> On Apr 8, 2011, at 3:55 PM, Matthew Turk wrote:
>>
>>> Hi John,
>>>
>>> It uses coarser cells to fill them in.
>>>
>>> -Matt
>>>
>>> On Fri, Apr 8, 2011 at 3:53 PM, John ZuHone <jzuhone at cfa.harvard.edu> wrote:
>>>> Hi all,
>>>>
>>>> Does anyone know what the covering grid does if the cell size on the covering grid is larger than the cells on the amr level? Is an average taken?
>>>>
>>>> Best,
>>>>
>>>> John Z
>>>> _______________________________________________
>>>> yt-users mailing list
>>>> yt-users at lists.spacepope.org
>>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>> _______________________________________________
>> 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