[petsc-users] matrix-free method with preconditioning for a linear system

Lailai Zhu lailaizhu00 at gmail.com
Tue Aug 9 10:27:43 CDT 2016


Hi, dear developers,

I am currently facing such a problem. I would like to use a matrix-free
method to solve a linear system. So I use 'MatCreateShell' with user-defined
subroutine to evaluate matrix-vector product. This works well, but is 
much slower
than the traditional matrix-assembling approach where different 
preconditioning
can be applied.

Now I would like to build a user-defined preconditioning for this 
matrix-free approach,
then I used to 'PCSHELL'. However, petsc told me that
'[0]PETSC ERROR: No support for this operation for this object type
[0]PETSC ERROR: Mat type shell'.

I am using petsc 3.7.2. It seems that this user-defined PC is not 
supported with the 'MatCreateShell'. Is this
indeed the case? Is there any way to circumvent this, for example by 
using 'MatCreateMFFD'
or a SNSE artificially for a linear problem?  Thanks in advance,

best,
lailai


More information about the petsc-users mailing list