[petsc-users] Using a Matrix Shell with SLEPc
Miguel Arriaga
miguelarriagaecunha at gmail.com
Fri Nov 7 16:39:19 CST 2014
Hi there,
I have a matrix shell where the Mult operation looks like this:
y=1/2(K+K*) x
with K=M^-1 A and K* its transpose.
1- For setting-up the operation MatMult, since I need to do a KSPSolve on
M, should I set-up the KSP on the operation MATOP_CREATE and destroy it on
MATOP_DESTROY and store it as a global variable?
2- For "inverting" M, considering that M is symmetric, Should I (a) use LU,
or should I (b) use an iterative procedure like CG with ILU, since M is
symmetric positive definite? Is there a faster iterative method for a SPD
matrix?
3- I want to use this matrix shell in SLEPc to compute the largest positive
eigenvalue, which will be smaller in magnitude than the smallest negative
real (possibly very close to zero). Since it is a matrix shell I assume
that I can't really use Shift-and-invert without choosing an iterative
procedure that only requires MatMult. What would be the best
Method+Preconditioner for this case? Note that this is a Real Symmetric
matrix (but not Positive definite). Should I set all of these as true?
MATOP_IS_HERMITIAN
MATOP_IS_STRUCTURALLY_SYMMETRIC
MATOP_IS_SYMMETRIC
Thank you,
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141107/f2725594/attachment.html>
More information about the petsc-users
mailing list