[petsc-users] Solving Singular Systems

Young, Matthew, Adam may at bu.edu
Fri May 29 13:33:31 CDT 2015


I have an elliptic PDE of the form Div[n(x) T Grad(phi)]=f(n,...) subject to periodic BC. (phi is the electrostatic potential in a PIC/fluid model). I expect there to be a constant null space but I'm not sure I'm dealing with it properly.

1) Section 4.6 of the manual suggests MatNullSpaceCreate() followed by KSPSetNullSpace(), but I have also seen examples that use MatSetNullSpace(). Is one preferred over the other?
2) Should I follow XXXSetNullSpace() with MatNullSpaceRemove() on the RHS Vec?
3) Do I need to MatNullSpaceDestroy() for either XXXSetNullSpace() option?
4) If so, should the destruction happen after KSPSolve()?
5) The manual (same section) says "You can run with the additional options -pc_factor_shift_nonzero <dampingfactor> or -pc_factor_shift_nonzero <dampingfactor> to prevent a zero pivot." This seems like a typo.

I believe I've done my due Google diligence, but I'm happy to be pointed elsewhere if these questions have come up before.

--A Different Matt

--------------------------------------------------------------
Matthew Young
Graduate Student
Boston University Dept. of Astronomy
--------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150529/561544e1/attachment.html>


More information about the petsc-users mailing list