[petsc-users] Assembling a matrix for a DMComposite vector
Anush Krishnan
anush at bu.edu
Tue Apr 29 08:43:35 CDT 2014
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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140429/08764227/attachment.html>
More information about the petsc-users
mailing list