<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 2, 2017 at 11:47 AM, 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:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">Jeremy Theler <<a href="mailto:jeremy@seamplex.com">jeremy@seamplex.com</a>> writes:<br>
<br>
> Hi all<br>
><br>
> I want to check that the near nullspace I provide to GAMG gives "almost<br>
> null vectors" when multiplying each vector in the near nullspace against<br>
> the matrix problem.<br>
><br>
> This way I can check that the unknown ordering I am using is consistent,<br>
> for example using by MatNullSpaceCreateRigidBody() or by computing the<br>
> nullspace by myself.<br>
<br>
</span>Please use that and MatSetNearNullSpace(). It composes properly and you<br>
can check everything.<br>
<br>
PCSetCoordinates() happens to do double-duty for aggregation-based<br>
methods, but outside of semi-geometric methods, it is just ugly code<br>
duplication and makes assumptions that may be inappropriate (like<br>
elasticity with an interpolatory basis). </blockquote><div><br></div><div>Yes, PCSetCoordinates is an old interface that is essentially deprecated. Maybe we should officially deprecated this.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I would recommend not using<br>
PCSetCoordinates().<br>
<div class="gmail-HOEnZb"><div class="gmail-h5"><br>
> The thing is I do not know how I can get the nullspace object after<br>
> calling PCSetCoordinates(). It gets a pointer to the PC object, but<br>
> MatGetNearNullSpace() needs the matrix object. I assume at some point<br>
> the matrix and the PC get linked, but when I ask<br>
> MatGetNearNullSpace(matrix) passing the problem matrix after setting<br>
> PCSetCoordinates(pc) I get:<br>
><br>
> error: PETSc error 85-0 'Null Object: Parameter # 1'<br>
> in /home/gtheler/libs/petsc-3.7.<wbr>4/src/mat/interface/matnull.c<br>
> MatNullSpaceGetVecs:64<br>
><br>
><br>
> thanks<br>
><br>
> --<br>
> Jeremy Theler<br>
> <a href="http://www.seamplex.com" rel="noreferrer" target="_blank">www.seamplex.com</a><br>
</div></div></blockquote></div><br></div></div>