[petsc-users] MatMult with factored matrix
Matthew Knepley
knepley at gmail.com
Thu Jul 8 12:21:32 CDT 2010
On Thu, Jul 8, 2010 at 7:18 PM, Daniel L Crumly
<daniel.crumly at colorado.edu>wrote:
> Thank you for the quick reply - I actually do want the action of the
> factored matrix (or preconditioner) on a vector. Is there a recommended
> workaround?
>
Not really. You would only need this for incomplete facotrization, and
neither the serial PETSc version,
nor any of the 3rd party solvers implement this. Its usually possible to
reformulate without it.
Matt
>
>
> Thanks
>
>
>
> Daniel "The Plaid Mentat" Crumly
>
> Daniel.Crumly at colorado.edu
>
> --------
>
> I give you the desert chameleon, whose ability to blend itself into the
> background tells you all you need to know about the roots of ecology and the
> foundations of a personal identity.
>
> --Book of Diatribes from the Hayt Chronicle
>
> ----Herbert, Frank. Children of Dune 28.
>
>
>
> *From:* petsc-users-bounces at mcs.anl.gov [mailto:
> petsc-users-bounces at mcs.anl.gov] *On Behalf Of *Matthew Knepley
> *Sent:* Thursday, July 08, 2010 11:10 AM
> *To:* PETSc users list
> *Subject:* Re: [petsc-users] MatMult with factored matrix
>
>
>
> On Thu, Jul 8, 2010 at 7:06 PM, Daniel L Crumly <
> daniel.crumly at colorado.edu> wrote:
>
> Hello all -
>
> Is there a recommended way to multiply a factored matrix by a vector
> (effectively MatMult where the matrix is a factored matrix or
> preconditioner)? Specifically, I would like to get take the ILU
> factorization of a matrix, then multiply a vector by this approximation.
>
>
>
> Do you actually want the action, or the action of the inverse? We only
> provide
>
> the action of the inverse
>
>
>
>
> http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatSolve.html
>
>
>
> Matt
>
>
>
> What I currently have is:
>
> ierr = PCGetType(pc, &pctype);CHKERRQ(ierr);
> if (strcmp(pctype, PCILU) == 0 || strcmp(pctype, PCICC) == 0) {
> ierr = PCFactorGetMatrix(pc, &M);CHKERRQ(ierr);
> ierr = MatMult(M, x, Mx);CHKERRQ(ierr);
> }
>
> which throws the runtime error (I'm currently using PETSc 3.0.0-p8.):
>
> [0]PETSC ERROR: --------------------- Error Message
> ------------------------------------
> [0]PETSC ERROR: Object is in wrong state!
> [0]PETSC ERROR: Not for factored matrix!
> [0]PETSC ERROR:
> ------------------------------------------------------------------------
>
> Any suggestions are greatly appreciated, thank you.
>
> Daniel "The Plaid Mentat" Crumly
> Daniel.Crumly at colorado.edu
> --------
> I give you the desert chameleon, whose ability to blend itself into the
> background tells you all you need to know about the roots of ecology and
> the
> foundations of a personal identity.
> --Book of Diatribes from the Hayt Chronicle
> ----Herbert, Frank. Children of Dune 28.
>
>
>
>
> --
> 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
>
--
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/20100708/52acdc98/attachment.htm>
More information about the petsc-users
mailing list