> On Mar 3, 2019, at 3:04 PM, Appel, Thibaut via petsc-users > <[email protected]> wrote: > > Assuming you preallocate/assemble a MPIAIJ matrix “by hand” using a > ISLocalToGlobalMapping object obtained from DMDA: what’s the easiest way to > get global column indices that do not belong to a process? > > Say, if you have a finite-difference stencil and the stencil exceeds the > portion owned by the process. > > I think the way to go is to preallocate a MPIAIJ matrix using local > information with MatPreallocateSetLocal and then fill values with > MatSetLocal, those routines can’t work with rows/columns not owned by the > process right?
Yes, MatSetValuesLocal() cannot write for matrix locations that are NOT in the ghosted region of the process. > > Thank you, > > Thibaut
