On Tue, Apr 14, 2009 at 1:04 PM, Yongcheng Zhou <span dir="ltr"><<a href="mailto:yongcheng.zhou@gmail.com">yongcheng.zhou@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
hi there,<br>
<br>
I want to link my own package with PETSc in order to make use of its<br>
various preconditioners. I am using<br>
matrix free method, so that I can directly refer the large matrix<br>
saved in my own format. The connection<br>
works OK without preconditioners, but runs into trouble when most of<br>
the preconditioners is called.<br>
For example, I got this message when using PCICC preconditionder:<br>
<br>
Matrix format shell does not have a built-in PETSc direct solver!<br>
<br>
So my question is how to utilize PETSc's powerful preconditioners for<br>
my matrix-free application.</blockquote><div><br>Most preconditioners want access directly to the underlying matrix data,<br>rather than its action. I see two alternatives:<br><br> a) Create a PETSc Mat instead. This is sure to be the easiest alternative.<br>
Is there a reason you cannot do this?<br><br> b) Write a converter to AIJ. This seems like a lot of work.<br><br>I think all the PCs you want rely on AIJ storage. People in linear algebra don't<br>think much of generic interfaces, and thus do not write their preconditioners<br>
to respect them (or you would only have to implement GetRow()).<br><br> Matt<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Thanks,<br>
<br>
Rocky<br>
</blockquote></div>-- <br>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<br>