<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
hi, Dear Matt,<br>
<br>
thanks very much. I think I found the problem, in the pcshell part,
i was<br>
using 'MatGetDiagonal' which is not supported for the shell-type
matrix. This<br>
caused the problem.<br>
<br>
best,<br>
lailai<br>
<br>
<div class="moz-cite-prefix">On 2016/8/9 17:57, Matthew Knepley
wrote:<br>
</div>
<blockquote
cite="mid:CAMYG4GkNLo7EZmyepqPA9Tb1YeWTH_UTJ2iKOXiUCeoXEPi9mA@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true"
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>
</blockquote>
<br>
<pre class="moz-signature" cols="72">
</pre>
</body>
</html>