[petsc-users] Better understanding VecScatter
Phil Tooley
phil.tooley at sheffield.ac.uk
Thu Oct 4 07:56:09 CDT 2018
Hi all,
I am trying to understand how to create a custom scatter from petsc
ordering in a local vector to natural ordering in a global vector.
I have a 3D DMDA and local vector containing field data and am
calculating the x y and z gradients into their own local vectors. I
then need to scatter these gradients to different parts of a single
vector so they are arranged [x_1 .. x_n y_1 .. y_n z_1 .. z_n] with
natural ordering. (This is for use in a custom numerical scheme that I
have been asked to parallelise)
I can of course do this using multiple scatters but I need to perform
this operation regularly and would like to express it as a single
scatter operation if possible.
I know I need to get the relevant AO from my DMDA and use it to
construct appropriate ISs to build the scatter context but I am unsure
how exactly to go about this.
Can someone point me in the right direction please?
Many Thanks
Phil
--
Phil Tooley
Research Software Engineering
University of Sheffield
More information about the petsc-users
mailing list