<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 9, 2016 at 10:27 AM, Lailai Zhu <span dir="ltr"><<a href="mailto:lailaizhu00@gmail.com" target="_blank">lailaizhu00@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, dear developers,<br>
<br>
I am currently facing such a problem. I would like to use a matrix-free<br>
method to solve a linear system. So I use 'MatCreateShell' with user-defined<br>
subroutine to evaluate matrix-vector product. This works well, but is much slower<br>
than the traditional matrix-assembling approach where different preconditioning<br>
can be applied.<br>
<br>
Now I would like to build a user-defined preconditioning for this matrix-free approach,<br>
then I used to 'PCSHELL'. However, petsc told me that<br>
'[0]PETSC ERROR: No support for this operation for this object type<br>
[0]PETSC ERROR: Mat type shell'.<br></blockquote><div><br></div><div>Send the ENTIRE error message. You should get a stack trace, which tells us where this</div><div>is happening. Make sure you are checking all return values using CHKERRQ().</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I am using petsc 3.7.2. It seems that this user-defined PC is not supported with the 'MatCreateShell'. Is this<br>
indeed the case? Is there any way to circumvent this, for example by using 'MatCreateMFFD'<br>
or a SNSE artificially for a linear problem? Thanks in advance,<br>
<br>
best,<br>
lailai<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>