Dear all,<div> I hope you're having a nice day.</div><div> I'm trying to get the x, y-value of a coordinate created by DMDACreate2d. Lines I wrote down are:</div><div><br></div><div><div> DMDAGetCoordinateDA(da, &cda);</div>
<div> DMDAGetGhostedCoordinates(da, &gc);</div><div> DMDAVecGetArray(cda, gc, &coors);</div><div><br></div><div> for (i = xs; i < xs+xm; i++) {</div><div> for (j = ys; j < ys+ym; j++) {</div><div> printf("%f %f\n", coors[j][i].x, coors[j][i].y);</div>
<div> }</div><div> }</div><div><br></div><div> DMDAVecRestoreArray(cda, gc, &coors);</div></div><div><br></div><div>I wonder why I need to use "DMDAVecRestoreArray(cda, gc, &coors);" I used it because the manual said I need. Actually, I tried to comment it out and there is no difference.</div>
<div><br></div><div>Thanks,</div><div>Alan</div>