<div class="gmail_quote">On Thu, Jun 23, 2011 at 17:38, Milan Mitrovic <span dir="ltr"><<a href="mailto:milan.v.mitrovic@gmail.com">milan.v.mitrovic@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":10r">SUBROUTINE dcop_mult(A,x,y,info)<br>
! args<br>
Mat A<br>
Vec x<br>
Vec y<br>
INTEGER, INTENT( OUT) :: info<br>
! vars<br>
INTEGER :: id<br>
info = 0<br>
! update ghosts<br>
CALL VecGhostUpdateBegin(x,INSERT_VALUES,SCATTER_FORWARD,info)<br>
CALL VecGhostUpdateEnd(x,INSERT_VALUES,SCATTER_FORWARD,info)<br>
CALL VecGhostUpdateBegin(y,INSERT_VALUES,SCATTER_FORWARD,info)<br>
CALL VecGhostUpdateEnd(y,INSERT_VALUES,SCATTER_FORWARD,info)<br></div></blockquote><div><br></div><div>y is an output-only argument, it doesn't make sense to do this second scatter.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":10r">
! get matrix context<br>
CALL MatShellGetContext(A,id,info)<br>
! apply dcops<br>
CALL particles_dcop_apply_petsc(AParticles,x,y,id,info)<br>
END SUBROUTINE dcop_mult</div></blockquote></div><br><div>Where do you call VecGhostGetLocalForm()?</div>