On Fri, Oct 5, 2018 at 6:49 PM Manuel Valera <mvaler...@sdsu.edu> wrote:

> Hello,
>
> 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,
>
> 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,
>

Its not clear to me what problem you are having. We have done this before.
For example,


https://www.mcs.anl.gov/petsc/petsc-current/src/snes/examples/tutorials/ex30.c.html

I would note that the development version of PETSc now has DMStag which
supports staggered grid discretizations directly.

  Thanks,

    Matt


> 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,
>
> Thanks,
>
>
>
>
>

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>

Reply via email to