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
--------------------------------------------------------------

Reply via email to