<div dir="ltr">yes, a lot of methods will use a staggered grid for vector data, like the MAC grids used in incompressible methods for velocity.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 20, 2016 at 11:27 AM, Erik Schnetter <span dir="ltr"><<a href="mailto:schnetter@gmail.com" target="_blank">schnetter@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Tue, Apr 19, 2016 at 7:53 PM, Jonah Miller<br>
<<a href="mailto:jonah.maxwell.miller@gmail.com">jonah.maxwell.miller@gmail.com</a>> wrote:<br>
> Hi yt-dev,<br>
><br>
> Nathan Goldbaum and I were discussing the possibility of handling<br>
> vertex-centered data natively in yt. We think that roughly this is quite<br>
> do-able and that most of the pieces are already in place. Nathan suggested I<br>
> summarize our discussion and email it to all of you to ask for your<br>
> opinions.<br>
><br>
> Internally, all that's required is using the generated ghost cells to<br>
> convert between cell- and vertex-centered data. (For non-periodic<br>
> boundaries, linear extrapolation, which would need to be implemented, should<br>
> be good enough.)<br>
><br>
> In the userspace side, we need a concept for this type of data so that it<br>
> can be extracted and manipulated. One option would be to make centering an<br>
> attribute for datasets. It could be immutable or mutable, depending on<br>
> design choices. In both cases, we would create a method to go between<br>
> centerings:<br>
> ds.to_centering(centering_type)<br>
><br>
> in the former case, this method would return a new dataset. In the latter<br>
> case, it would reset the dataset.<br>
><br>
> In principle, centering is a metadata property. The input data can be<br>
> interpolated when it's explored and not before. So for this reason, it makes<br>
> some sense to leave the centering as a dataset property rather than as, say,<br>
> a field property.<br>
><br>
> I think that's about it. Nathan can correct me if I forgot something.<br>
<br>
</div></div>There is not just vertex- and cell-centring; centring can be different<br>
in each direction.<br>
<br>
I think of centring in the following way:<br>
<br>
(1) There is an underlying cell-centred grid, set up the way yt<br>
expects it, with the expected relations between refinement levels<br>
(2) Variables can be stored either at the cell centres (as is<br>
currently expected), or can be offset (shifted to the left) by 1/2<br>
cell in each of the directions x, y, z<br>
(3) Thus the data live either in the cell centre, the faces, edges, or<br>
vertices. In 3D, there are 2^3 = 8 possibilities.<br>
<span class="HOEnZb"><font color="#888888"><br>
-erik<br>
<br>
--<br>
Erik Schnetter <<a href="mailto:schnetter@gmail.com">schnetter@gmail.com</a>><br>
<a href="http://www.perimeterinstitute.ca/personal/eschnetter/" rel="noreferrer" target="_blank">http://www.perimeterinstitute.ca/personal/eschnetter/</a><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" rel="noreferrer" 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 class="gmail_signature"><div dir="ltr"><div><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>github: <a href="http://github.com/zingale" target="_blank">http://github.com/zingale</a></div><div><br></div></div></div></div>
</div>