[yt-dev] Downgrading Grid Resolution in yt

Cameron Hummels chummels at astro.columbia.edu
Fri Jun 1 09:26:11 PDT 2012


Hi Matt,

Thanks for the quick responses!
>
> pf.h.grids has an array of grids. This is definitely in the docs. You 
> can get their LeftEdge and RightEdge, and they also have the 
> get_global_startindex function which gives it to you in level-relative 
> integers.
>
I'll look into this, thanks!

> >
> >
> >> I also believe that if you ask for a covering grid at level 9, and it
> >> covers grids at level 10, it will not use the level 10 grids when
> >> calculating the constituent values.  There's this trick we do to
> >> figure out if the child masking should be taken into account with
> >> covering grids, and the criteria is: is this the final level we want
> >> to sample to?
> >
> > That sounds great.  So all I want to do is simply ignore child 
> masking data from levels on the highest level of refinement.  But 
> again, is there any function which does this publicly, or is it all 
> buried in covering_grid?
>
> What I am getting at is that you could just use covering grid and 
> specify a lower level than the highest.
>
Your suggestion will not universally downgrade the resolution by 1, it 
will only downgrade the resolution of items at the *top* level of 
refinement by 1, but grids on lower refinement levels will remain the 
same.  I'm looking for something that will downgrade refinement 
everywhere by 1, including regions at lower refinement.

Any ideas on this, or is this just going to take an additional set of 
homemade functions inspecting each grid individually as per 
get_global_startindex() from above?

Thanks again for all of the help with this!

Cameron





More information about the yt-dev mailing list