<div dir="ltr">that fix looks ok to me, but at the same time, for this particular function, it is not clear to me you need to extend the domain at all.  (For the SmoothedCoveringGridBase, we do the same thing, and there I agree you would want this).</div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 18, 2014 at 12:48 PM, Michael Zingale <span dir="ltr"><<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">thanks for the dims pointer -- I was doing a single-level, so I guess I escaped that.</div><div class="HOEnZb">
<div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 18, 2014 at 12:45 PM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Mike,<br>
<div><br>
On Fri, Apr 18, 2014 at 12:29 PM, Michael Zingale<br>
<<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</a>> wrote:<br>
> The FFT script I posted yesterday does it<br>
><br>
> <a href="http://paste.yt-project.org/show/4528/" target="_blank">http://paste.yt-project.org/show/4528/</a><br>
><br>
> I do:<br>
><br>
> cube = pf.covering_grid(max_level, left_edge=pf.domain_left_edge,<br>
>                         dims=pf.domain_dimensions,<br>
>                         fields=[irho, iu, iv, iw])<br>
><br>
<br>
</div>While this shouldn't impact it, the dims argument here is in terms of<br>
the max_level argument; so if you're at level 0, it will be in terms<br>
of level 0 dx, whereas if you're at level 1, it'll be at level 1 dx.<br>
This should only make things better, not worse.<br>
<br>
I think you're right, this is absolutely a bug.  I've replicated it here:<br>
<br>
<a href="http://paste.yt-project.org/show/4537/" target="_blank">http://paste.yt-project.org/show/4537/</a><br>
<br>
Looking it over, the problem is actually in the python code.  The<br>
*region* selector, not the *covering grid*, is made to be "more<br>
inclusive" so as to help out.  Now, the thing is, this actually breaks<br>
for non-periodic regions ,rather than simply selecting correctly.  In<br>
construction_data_containers.py I was able to fix it by changing line<br>
483 or so to be:<br>
<br>
        self._data_source = self.pf.region(self.center,<br>
            self.left_edge - self.base_dds * self.pf.periodicity,<br>
            self.right_edge + self.base_dds * self.pf.periodicity)<br>
<br>
Does this look alright to you?<br>
<br>
-Matt<br>
<div><div><br>
> then if I don't hack:<br>
><br>
> pf.periodicity = (True, True, True)<br>
><br>
> before doing:<br>
><br>
> rho = cube[irho].d<br>
><br>
> I get the error.  I imagine any dataset would show this error if you hack<br>
> one of the periodicity components to False before accessing the cube.<br>
><br>
><br>
> On Fri, Apr 18, 2014 at 12:17 PM, Matthew Turk <<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Mike,<br>
>><br>
>> On Fri, Apr 18, 2014 at 12:02 PM, Michael Zingale<br>
>> <<a href="mailto:michael.zingale@stonybrook.edu" target="_blank">michael.zingale@stonybrook.edu</a>> wrote:<br>
>> > If I create a covering_grid for a full domain that is not<br>
>> > triply-periodic,<br>
>> > the code will abort when I try to access the data in the covering grid<br>
>> > with<br>
>> > an error generated by selection_routines.pyx that is looking to make<br>
>> > sure<br>
>> > that the boundary conditions are supported.  I understand that this<br>
>> > support<br>
>> > is not yet in place, but I don't think that it should be an issue for a<br>
>> > covering_grid.<br>
>><br>
>> I agree, it should not.  Can you tell me how you're generating the<br>
>> covering grid?  If it is set with the origin at domain_left_edge and<br>
>> dimensions equal to the dimensions of the domain (at whatever<br>
>> refinement level you've specified) this should not error.<br>
>><br>
>> ><br>
>> > The covering grid procedure itself should not ever need boundary<br>
>> > conditions,<br>
>> > if I understand what it intends to do.  If you are just sampling the<br>
>> > coarse<br>
>> > data (or averaging the overlying fine data) into your zone, there is no<br>
>> > need<br>
>> > to do any interpolation that would require BCs.  For the<br>
>> > SmoothedCoveringGrid stuff, I understand that BCs should come into play.<br>
>> > Am<br>
>> > I missing something? or should this check on the BCs be considered a bug<br>
>> > in<br>
>> > this case?<br>
>><br>
>> This sounds like a bug to me!<br>
>><br>
>> ><br>
>> > Mike<br>
>> ><br>
>> > --<br>
>> > Michael Zingale<br>
>> > Associate Professor<br>
>> ><br>
>> > Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY<br>
>> > 11794-3800<br>
>> > phone:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a><br>
>> > e-mail: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a><br>
>> > web: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a><br>
>> ><br>
>> > _______________________________________________<br>
>> > yt-dev mailing list<br>
>> > <a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
>> > <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
>> ><br>
>> _______________________________________________<br>
>> yt-dev mailing list<br>
>> <a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
><br>
><br>
><br>
><br>
> --<br>
> Michael Zingale<br>
> Associate Professor<br>
><br>
> Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY<br>
> 11794-3800<br>
> phone:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a><br>
> e-mail: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a><br>
> web: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a><br>
><br>
> _______________________________________________<br>
> yt-dev mailing list<br>
> <a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org" target="_blank">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div>

<div><i>phone</i>:  <a href="tel:631-632-8225" value="+16316328225" target="_blank">631-632-8225</a></div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div>
<div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div>

</div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div>
<div><i>phone</i>:  631-632-8225</div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div>

</div>