<div class="gmail_quote">On Wed, Sep 19, 2012 at 3:15 AM, Stefano Zampini <span dir="ltr"><<a href="mailto:stefano.zampini@gmail.com" target="_blank">stefano.zampini@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
MatSetNullSpace triggers KSPSetNullSpace when doing KSPSetup. This in turn activates MatNullSpaceRemove after PCApply and destroys the convergence of BDDC, since it changes the preconditioned operator.</blockquote><div><br>
</div><div>Uh, the PC shouldn't be putting any contribution in the null space of the operator.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> With BDDC, if you have a linear system with a non-trivial kernel, you need to take care of when projecting the residual vector onto the coarse null space and remove it after expanding the coarse solution onto the partially subassembled space. You don't need to remove the null space from the preconditioned vector; instead, you need to properly calculate the null space of the coarse problem (see function AdaptNullSpace and lines 4164-4220 in bddc.c), and remove it around coarse problem solving (see lines 2014-2022 in bddc.c).</blockquote>
</div><br><div>You have to do basically the same thing on coarse levels of multigrid. I guess what you're saying is that a side-effect of this treatment in BDDC is that the preconditioner already has zero component in the direction of the null space so the explicit removal is not necessary? If we're just trying to avoid the explicit projection in KSP_PCApply*, I would prefer to add an attribute to PC saying that it "handles the null space internally".</div>
<div><br></div><div>(I hate having new implementation-specific interfaces that basically do the same thing from the user's perspective, thus I want to find a way for MatSetNullSpace() to do the right thing.)</div>