[petsc-users] Convert a 3D DMDA sub-vector to a natural 2D vector

Sajid Ali sajidsyed2021 at u.northwestern.edu
Mon Jan 25 18:36:40 CST 2021


Hi Randall,

Thanks for providing a pointer to the DMDAGetRay function!

After looking at its implementation, I came up with a solution that creates
a natural ordered slice vector on the same subset of processors as the DMDA
ordered slice vector (by scattering from the DMDA order slice to a natural
ordered slice by using an AO associated with a temporary 2D DMDA object
that lives only on the subset of ranks where the slice vector lives). I've
attached the code for the same should it be of interest to anyone who reads
this.

--
Sajid Ali (he/him) | PhD Candidate
Applied Physics
Northwestern University
s-sajid-ali.github.io
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210125/dbe7c65c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ex_slice_nat.c
Type: application/octet-stream
Size: 13363 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210125/dbe7c65c/attachment.obj>


More information about the petsc-users mailing list