[petsc-users] getting the near nullspace from PCSetCoordinates

Mark Adams mfadams at lbl.gov
Mon Jan 2 16:58:42 CST 2017


On Mon, Jan 2, 2017 at 11:47 AM, Jed Brown <jed at jedbrown.org> wrote:

> Jeremy Theler <jeremy at seamplex.com> writes:
>
> > Hi all
> >
> > I want to check that the near nullspace I provide to GAMG gives "almost
> > null vectors" when multiplying each vector in the near nullspace against
> > the matrix problem.
> >
> > This way I can check that the unknown ordering I am using is consistent,
> > for example using by MatNullSpaceCreateRigidBody() or by computing the
> > nullspace by myself.
>
> Please use that and MatSetNearNullSpace().  It composes properly and you
> can check everything.
>
> PCSetCoordinates() happens to do double-duty for aggregation-based
> methods, but outside of semi-geometric methods, it is just ugly code
> duplication and makes assumptions that may be inappropriate (like
> elasticity with an interpolatory basis).


Yes, PCSetCoordinates is an old interface that is essentially deprecated.
Maybe we should officially deprecated this.


> I would recommend not using
> PCSetCoordinates().
>
> > The thing is I do not know how I can get the nullspace object after
> > calling PCSetCoordinates(). It gets a pointer to the PC object, but
> > MatGetNearNullSpace() needs the matrix object. I assume at some point
> > the matrix and the PC get linked, but when I ask
> > MatGetNearNullSpace(matrix) passing the problem matrix after setting
> > PCSetCoordinates(pc) I get:
> >
> > error: PETSc error 85-0 'Null Object: Parameter # 1'
> > in /home/gtheler/libs/petsc-3.7.4/src/mat/interface/matnull.c
> > MatNullSpaceGetVecs:64
> >
> >
> > thanks
> >
> > --
> > Jeremy Theler
> > www.seamplex.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170102/442bf044/attachment.html>


More information about the petsc-users mailing list