<div class="gmail_quote">On Tue, Dec 7, 2010 at 23:41, Ethan Coon <span dir="ltr"><<a href="mailto:ecoon@lanl.gov">ecoon@lanl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":dm"> This probably doesn't merit a change in the DMDACreate* API (it would<br>
affect a very large amount of user code). The most obvious alternative<br>
to an API change would be a larger, somewhat convoluted enum for the<br>
PeriodicType (DMDA_XPERIODIC_YGHOSTED, DMDA_XYGHOSTED, etc) which could<br>
at least be made backward compatible.</div></blockquote></div><div><br></div>I think I prefer<div><br><div>enum {</div><div>NONPERIODIC = 0,</div><div>XGHOSTED = 0x1,</div><div>XPERIODIC = 0x3,</div><div>YGHOSTED = 0x4,</div>
<div>YPERIODIC = 0xc,</div><div>ZGHOSTED = 0x10,</div><div>ZPERIODIC = 0x11,</div><div>}</div><div><br></div><div>DMDACreate3D(...,XPERIODIC | YGHOSTED,...).</div><div><br></div><div>would produce periodic in X, ghosted in Y, and no endpoint ghosts (but still internal neighbors) in Z.</div>
<div><br></div><div>If you really wanted, you could</div><div><br></div><div>#define DMDA_YZPERIODIC (DMDA_YPERIODIC | DMDA_ZPERIODIC)</div><div><br></div><div>but I don't think it's a big deal (users can do that if they want, but it's working around an awkward initial API choice).</div>
<div><br></div><div>Handling anisotropic stencil width would be useful for some problems, but it's a much bigger effort.</div><div><br></div><div>Jed</div></div>