[petsc-users] Ghost communication
Milan Mitrovic
milan.v.mitrovic at gmail.com
Thu Jun 23 10:38:24 CDT 2011
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)
! get matrix context
CALL MatShellGetContext(A,id,info)
! apply dcops
CALL particles_dcop_apply_petsc(AParticles,x,y,id,info)
END SUBROUTINE dcop_mult
More information about the petsc-users
mailing list