[petsc-users] Get global column indices thay belong to another process?

Matthew Knepley knepley at gmail.com
Sun Mar 3 15:36:15 CST 2019


On Sun, Mar 3, 2019 at 4:06 PM Appel, Thibaut via petsc-users <
petsc-users at mcs.anl.gov> 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?
>

I can't quite understand what you want. Are you saying:

  Suppose I create a LocalToGlobalMapping, but I still want to set values
on another process that are not in my map?

If you have no other structure, then you just need to know the global
indices for the element. It sounds like then you
say, if I am using a DMDA and I declare a stencil width of s, but want to
set value for point greater than s away from
the block I own, can I determine those indices? Yes, its just a pain. You
can get everything you need from DMDAInfo
and DMDALocalInfo, but we have no function to do it.

   Matt


> Thank you,
>
> Thibaut



-- 
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/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190303/e61abcbc/attachment.html>


More information about the petsc-users mailing list