<div class="gmail_quote">On Fri, Jan 6, 2012 at 16:18, Xuefeng Li <span dir="ltr"><<a href="mailto:li@loyno.edu">li@loyno.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":ac3">The stencil width of my DA to a DMMG object is<br>
created to be 1. It is later adjusted using<br>
DASetStencilWidth() to 2. </div></blockquote><div><br></div><div>You are not supposed to do this.</div><div><br></div><div>Either call DMDACreate2d() (or whichever dimension you want) or call the sequence</div><div><br></div>
<div><div> ierr = DMDACreate(comm, da);CHKERRQ(ierr);</div><div> ierr = DMDASetDim(*da, 2);CHKERRQ(ierr);</div><div> ierr = DMDASetSizes(*da, M, N, 1);CHKERRQ(ierr);</div><div> ierr = DMDASetNumProcs(*da, m, n, PETSC_DECIDE);CHKERRQ(ierr);</div>
<div> ierr = DMDASetBoundaryType(*da, bx, by, DMDA_BOUNDARY_NONE);CHKERRQ(ierr);</div><div> ierr = DMDASetDof(*da, dof);CHKERRQ(ierr);</div><div> ierr = DMDASetStencilType(*da, stencil_type);CHKERRQ(ierr);</div><div> ierr = DMDASetStencilWidth(*da, s);CHKERRQ(ierr);</div>
<div> ierr = DMDASetOwnershipRanges(*da, lx, ly, PETSC_NULL);CHKERRQ(ierr);</div><div> ierr = DMSetFromOptions(*da);CHKERRQ(ierr);</div><div> ierr = DMSetUp(*da);CHKERRQ(ierr);</div><div><br></div></div><div><br></div>
<div>I am updating all these functions now to give an error if you call them after DMSetUp().</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":ac3">
DAGetInfo() confirmed<br>
that the stencil width is indeed 2. However,<br>
DAGetGhostCorners()/<u></u>DAGetCorners() show that<br>
the ghost point width is 1, instead of 2.</div></blockquote></div><br>