[petsc-users] matrix-free method with preconditioning for a linear system
Matthew Knepley
knepley at gmail.com
Tue Aug 9 10:57:01 CDT 2016
On Tue, Aug 9, 2016 at 10:27 AM, Lailai Zhu <lailaizhu00 at gmail.com> wrote:
> 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'.
>
Send the ENTIRE error message. You should get a stack trace, which tells us
where this
is happening. Make sure you are checking all return values using CHKERRQ().
Thanks,
Matt
> 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
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160809/90256d49/attachment-0001.html>
More information about the petsc-users
mailing list