<div class="gmail_quote">On Wed, Feb 15, 2012 at 18:25, Sylvain Barbot <span dir="ltr"><<a href="mailto:sylbar.vainbot@gmail.com">sylbar.vainbot@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi All,<br>
<br>
I'm implementing an elasticity multi-grid solver with Petsc with<br>
matrix shells. I am using the Red-Black Gauss-Siedel smoother. In the<br>
middle of the Red-Black passes, I need to update the ghost points<br>
between processors. To do that effectively, I'd like to update only<br>
the ghost points between the different processors, instead of the<br>
whole array. The goal is to do the most possible operations in place<br>
in local array lx, and having to update global vector x only once. The<br>
working matrix multiply smoothing operation is shown below. I'm using<br>
Petsc 3.1. I read about<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-3.1/docs/manualpages/Vec/VecGhostUpdateBegin.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-3.1/docs/manualpages/Vec/VecGhostUpdateBegin.html</a>,<br>
but I'm not entirely clear whether this does what I want or not.<br></blockquote><div><br></div><div>VecGhost does not work with a DA (pretty obvious since the structured grid layout doesn't put those points near each other). Writing just the updated points into the local array will cost as much as updating the whole thing, so don't worry about it.</div>
<div><br></div><div>Your red-black Gauss-Seidel will have horrible cache performance anyway, so no need to sweat about the part that isn't the bottleneck.</div></div>