<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Fri, Oct 5, 2018 at 6:49 PM Manuel Valera <<a href="mailto:mvalera-w@sdsu.edu">mvalera-w@sdsu.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hello,<div dir="auto"><br></div><div dir="auto">I'm trying to do a simple variable interpolation, from a cell center to a face in a staggered grid, my model data management is done with DMDAs, with two different DMs one for each cell position, </div><div dir="auto"><br></div><div dir="auto">I already did this task on a fortran only version of the model using the 4 closest neighbors of the scalars (cell center) to be interpolated at the velocity site (cell face), i did it using a loop over the domain, somehow this easy task is not translating into the DMDA framework, </div></div></blockquote><div><br></div><div>Its not clear to me what problem you are having. We have done this before. For example, </div><div><br></div><div>  <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex30.c.html">https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex30.c.html</a></div><div><br></div><div>I would note that the development version of PETSc now has DMStag which supports staggered grid discretizations directly.</div><div><br></div><div>  Thanks,</div><div><br></div><div>    Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div dir="auto">I'm not sure what I'm doing wrong or not aware of a easier way Petsc may have for this task, if you could point out an easier strategy or an example I would be grateful, </div><div dir="auto"><br></div><div dir="auto">Thanks, </div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto"><br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div></div>