[yt-dev] cell padding in RegionSelector

Douglas Harvey Rudd drudd at uchicago.edu
Thu Aug 15 10:10:10 PDT 2013


Hi again,

A bit more information that people might find useful interpreting my previous question (sorry for the verbosity).

I added a check in the RegionSelector to ensure that a region larger than the domain was not requested (which may
be a sign of incorrect logic in the request).  It turns out that some parts of the code automatically request more than the
domain, and I attributed that to dx_pad.

dx_pad is set to 0.5 in YTRegionBase, and not touched anywhere else in the code that I could find.  Setting it to 0 continues
to pass all tests (its behavior does not appear to be used).  

That didn't eliminate requests for regions larger than the domain, however, due to the use of the grid_patch function, which 
attempts to extend the region but doesn't check if the region already contained the new volume (due to periodicity).  I don't
want to make any changes here, though.

Here is my proposed solution that I'd like to make sure won't break other people's codes not reflected in the tests:

1) Remove _dx_pad from YTRegionBase and from RegionSelector.  Tests will function as normal, the only risk is for user
code that expects the padding.

2) Change my test in RegionSelector to accept region requests that are larger than the domain, provided the domain is
periodic in that dimension.  If not, it will still generate an error, because a ghost zone was requested that does not exist.

Thoughts?

Douglas Rudd
Scientific Computing Consultant
Research Computing Center
drudd at uchicago.edu



On Aug 15, 2013, at 10:11 AM, Douglas Harvey Rudd <drudd at uchicago.edu>
 wrote:

> Hi all,
> 
> Matt and I are finishing up our changes to the selector functions and ran into a feature which may or may not be currently used.
> 
> In RegionSelector, there is a parameter _dx_pad to allow for cells just outside the selected region to be included.  Is anyone using
> that feature or can it be deprecated?
> 
> Douglas Rudd
> Scientific Computing Consultant
> Research Computing Center
> drudd at uchicago.edu
> 
> 
> 
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org




More information about the yt-dev mailing list