[petsc-users] Algorithms to remove null spaces in a singular system

Jed Brown jed at jedbrown.org
Wed Oct 12 22:24:36 CDT 2016


Fande Kong <fdkong.jd at gmail.com> writes:

> I think we need to make sure that the basis vectors are orthogonal to each
> other and they are normalized. Right?

Yes, that is clearly stated in the man page and checked for in debug
mode.  The relevant code to remove the null space is

  if (sp->n) {
    ierr = VecMDot(vec,sp->n,sp->vecs,sp->alpha);CHKERRQ(ierr);
    for (i=0; i<sp->n; i++) sp->alpha[i] = -sp->alpha[i];
    ierr = VecMAXPY(vec,sp->n,sp->alpha,sp->vecs);CHKERRQ(ierr);
  }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 800 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20161012/1b18942f/attachment.pgp>


More information about the petsc-users mailing list