<div dir="ltr"><div class="gmail_extra">Hi Anton,<br><br><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote">You can do the whole thing much easier (to my opinion).<br>
</blockquote><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
Since you created two DMDA anyway, just do:<br>
<br>
- find first index on every processor using MPI_Scan<br>
- create two global vectors (no ghosts)<br>
- put proper global indicies to global vectors<br>
- create two local vectors (with ghosts) and set ALL entries to -1
(to have what you need in boundary ghosts)<br>
- call global-to-local scatter<br>
<br>
Done!<br></div></blockquote><div><br>Thanks for the suggestion. That does seem easier to implement.<br><br>I would still like the understand the behaviour of DMCompositeGetISLocalToGlobalMappings though.<br><br>Anush<br>
<br> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
The advantage is that you can access global indices (including
ghosts) in every block using i-j-k indexing scheme.<br>
I personally find this way quite easy to implement with PETSc<span class=""><font color="#888888"><br>
<br>
Anton<br>
</font></span></div>
</blockquote></div><br></div></div>