[petsc-users] wrap MATMPIAIJ in MatShellSetOperation and use in SLEPc

Denis Davydov davydden at gmail.com
Tue Oct 14 05:46:17 CDT 2014


Dear Jose,

Thanks for your prompt answer. Now I see the problem. 
I will give it a try with "-st_matmode shell” first and see how it goes...

Kind regards,
Denis 

On 13 Oct 2014, at 19:27, Jose E. Roman <jroman at dsic.upv.es> wrote:
> 
> This case is discussed in section 3.4.2 of SLEPc's users guide. Basically, the default behaviour in shift-and-invert is that SLEPc builds matrix C=A-sigma*B (where sigma is the shift). In this case, the "A" matrix (the shell matrix in your case) needs two additional operations: duplicate and AXPY. You could implement these two operations in your shell matrix. You can also try with "-st_matmode inplace" in which case only AXPY is required. But probably what you want is to set "-st_matmode shell" so that you do not need any additional operation; the downside in all cases is that direct linear solves cannot be used and you must be cautious when using shift-and-invert with iterative linear solvers (see discussion at section 3.4.1).
> 
> Jose

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


More information about the petsc-users mailing list