[petsc-users] Ghost communication
Jed Brown
jed at 59A2.org
Thu Jun 23 10:41:06 CDT 2011
On Thu, Jun 23, 2011 at 17:38, Milan Mitrovic <milan.v.mitrovic at gmail.com>wrote:
> SUBROUTINE dcop_mult(A,x,y,info)
> ! args
> Mat A
> Vec x
> Vec y
> INTEGER, INTENT( OUT) :: info
> ! vars
> INTEGER :: id
> info = 0
> ! update ghosts
> CALL VecGhostUpdateBegin(x,INSERT_VALUES,SCATTER_FORWARD,info)
> CALL VecGhostUpdateEnd(x,INSERT_VALUES,SCATTER_FORWARD,info)
> CALL VecGhostUpdateBegin(y,INSERT_VALUES,SCATTER_FORWARD,info)
> CALL VecGhostUpdateEnd(y,INSERT_VALUES,SCATTER_FORWARD,info)
>
y is an output-only argument, it doesn't make sense to do this second
scatter.
> ! get matrix context
> CALL MatShellGetContext(A,id,info)
> ! apply dcops
> CALL particles_dcop_apply_petsc(AParticles,x,y,id,info)
> END SUBROUTINE dcop_mult
>
Where do you call VecGhostGetLocalForm()?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110623/b7cfed59/attachment.htm>
More information about the petsc-users
mailing list