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

Barry Smith bsmith at mcs.anl.gov
Wed Oct 12 23:06:30 CDT 2016


> On Oct 12, 2016, at 10:52 PM, Fande Kong <fdkong.jd at gmail.com> wrote:
> 
> 
> 
> On Wed, Oct 12, 2016 at 9:24 PM, Jed Brown <jed at jedbrown.org> wrote:
> 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);
>   }
> 
> 
> 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.

  I would make that a separate routine that the users would call first.

  Barry

> 
> Fande,
> 
>  
> 



More information about the petsc-users mailing list