[petsc-users] MatShell & PCShell

Klaij, Christiaan C.Klaij at marin.nl
Thu Jun 24 03:08:37 CDT 2010


Thanks!
I modified ex15f so that it uses a new MatShell AA with associated multiplication Ax. Only problem is that MatCreateShell expects the local matrix dimensions which is somewhat contrary to the spirit of ex15f, but at least I got it working for one proc.

Chris

Date: Wed, 23 Jun 2010 16:46:30 +0200
From: Jed Brown <jed at 59A2.org>
Subject: Re: [petsc-users] MatShell & PCShell
To: "Klaij\, Christiaan" <C.Klaij at marin.nl>,
        "petsc-users\@mcs.anl.gov" <petsc-users at mcs.anl.gov>
Message-ID: <87zkylrem1.fsf at 59A2.org>
Content-Type: text/plain; charset=us-ascii

On Wed, 23 Jun 2010 14:32:53 +0000, "Klaij, Christiaan" <C.Klaij at marin.nl> wrote:
> Hi,
>
> For my linear problem Ax=b I have available the vector b, the action
> Ax of the matrix and the action Px of a given preconditioner. Is this
> enough to use the Krylov solvers in PETSc? So far I've looked at ex14f
> and ex15f which use either MatShell or PCShell but not both. I'm not
> sure whether it's at all possible, so I would greatly appreciate your
> advice before starting some trial and error.

You can certainly use both, and you pretty much have to unless you have
an assembled matrix that is "similar" to your MatShell because, for
obvious reasons, PETSc's preconditioners can't do much with your
MatShell.

Jed


dr. ir.ChristiaanKlaij
CFD Researcher
Research & Development
E mailto:C.Klaij at marin.nl
T +31 317 49 33 44M

MARIN
2, Haagsteeg, P.O. Box 28, 6700 AA Wageningen, The Netherlands
T +31 317 49 39 11, F +31 317 49 32 45, I www.marin.nl



-----------------------------
[Insert your disclaimer here]
-----------------------------



More information about the petsc-users mailing list