<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: arial,helvetica,sans-serif; font-size: 12pt; color: #000000'>Good morning,<br>I'm writing my MatMult function, but I don't know how to treat the ghost elements of the result vec. Let's say myMatMult(A,x,y).<br><br>First question is: if I use my MatMult in a KSP to solve a linear system, do I have to update ghost elements in the result vec of MatMult?? Consider that any time the code enters myMatMult the vec x is copied in my container and the ghost of my container are updated. I made computation for matrix-vector and I copied the results in vec y, without considering ghost elements of y.<br><br>Second question: if I have to, how? <br>Let's say I state:<br>ierr = myMatMult(A,x,y);<br>and x has been built out of myMatMult with VecGhostCreate.<br>How do I update ghost elements of y in myMatMult? VecGhostUpdateBegin/VecGhostUpdateEnd in myMatMult?<br><br>Any hints would be appreciated.<br>Thanks for you advices in advance.<br><br>Bests,<br><br>Marco<br></div></body></html>