So DM_BOUNDARY_GHOSTED values are not updated then in the DMDALocalToLocal 
routines. I should instead use DM_BOUNDARY_NONE and make the domain larger by 2 
elements if I need those values to be shared between processes then? Is that 
the best approach?

Thanks,

Lucas

________________________________
From: Matthew Knepley <[email protected]>
Sent: Friday, May 22, 2020 8:03 PM
To: Lucas Banting <[email protected]>
Cc: PETSc <[email protected]>
Subject: Re: [petsc-users] Question about DMLocalToLocal for 
DM_BOUNDARY_GHOSTED conditions

On Fri, May 22, 2020 at 4:34 PM Lucas Banting 
<[email protected]<mailto:[email protected]>> wrote:
Hello,

I am converting a serial code to parallel in fortran with petsc. I am using the 
DMDA to manage communication of the information that used to be in old 
two-dimensional fortran arrays.

I noticed when using DMLocalToLocalBegin/End, not all the ghost values in the 
array at the DM_BOUNDARY_GHOSTED area is updated. Is this expected behaviour?

I believe so. GHOSTED is user managed space. We do not touch it.

I read through this thread: 
https://lists.mcs.anl.gov/mailman/htdig/petsc-users/2016-May/029252.html and 
saw someone had a similar question, but the answer was not clear to me.

If this is expected behaviour, how should I instead update these values in my 
arrays? I was using DM_BOUNDARY_GHOSTED as I needed the extra ghost cells for 
some subroutines, but I do not need them in my matrix from DMCreateMatrix.

You fill them in the local vector.

  Thanks,

      Matt

I am using Petsc 3.12.4 and open MPI 3.1.4.

Thanks,

Lucas Banting


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