Hi Anton, You can do the whole thing much easier (to my opinion). > Since you created two DMDA anyway, just do: > > - find first index on every processor using MPI_Scan > - create two global vectors (no ghosts) > - put proper global indicies to global vectors > - create two local vectors (with ghosts) and set ALL entries to -1 (to > have what you need in boundary ghosts) > - call global-to-local scatter > > Done! >
Thanks for the suggestion. That does seem easier to implement. I would still like the understand the behaviour of DMCompositeGetISLocalToGlobalMappings though. Anush > > The advantage is that you can access global indices (including ghosts) in > every block using i-j-k indexing scheme. > I personally find this way quite easy to implement with PETSc > > Anton >
