<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 12, 2016 at 9:24 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="gmail-">Fande Kong <<a href="mailto:fdkong.jd@gmail.com">fdkong.jd@gmail.com</a>> writes:<br>
<br>
> I think we need to make sure that the basis vectors are orthogonal to each<br>
> other and they are normalized. Right?<br>
<br>
</span>Yes, that is clearly stated in the man page and checked for in debug<br>
mode. The relevant code to remove the null space is<br>
<br>
if (sp->n) {<br>
ierr = VecMDot(vec,sp->n,sp->vecs,sp-<wbr>>alpha);CHKERRQ(ierr);<br>
for (i=0; i<sp->n; i++) sp->alpha[i] = -sp->alpha[i];<br>
ierr = VecMAXPY(vec,sp->n,sp->alpha,<wbr>sp->vecs);CHKERRQ(ierr);<br>
}<br></blockquote><div><br></div><div><br></div><div>Right now, we are forcing users to provide orthogonal basis vectors. Is there any issue if we orthogonalize the arbibitry basis vectors provided by users in PETSc? And then users could pass arbitrary basis vectors without doing any preprocessing.</div><div><br></div><div>Fande,</div><div><br></div><div> </div></div><br></div></div>