[petsc-users] Extract subdomain values from DMDA

Tina Patel tinap89 at yahoo.com
Sat Apr 22 20:37:47 CDT 2017


Hello everyone,
I want to manipulate a global vector that has values only on the subgrid of a larger grid obtained by DMDACreate3d(). For example, I'd like to extract a 6x6x6 chunk from a 7x7x7 grid. 
At some point, I need to put that 6x6x6 chunk from the logical xyz cartesian coordinates into a natural vector "b" to solve Ax=b at every iteration, then map it back to xyz coordinate system to do further calculations with ghost values.
The closest thing I can compare it to is MPI_Type_create_subarray. Do I just use this or is there a better way?

Thanks for your time,Tina
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170423/8d342c20/attachment.html>


More information about the petsc-users mailing list