matrix inversion
Matthew Knepley
knepley at gmail.com
Fri Sep 21 10:06:47 CDT 2007
On 9/21/07, Randall Mackie <randy at geosystem.us> wrote:
> I have a collegue who is considering to use PETSc for programming
> his problem. He would like to know if you can get the actual
> inverse of a matrix, because this inverse is embedded in another
> larger system that is then solved.
>
> I suppose that if you solve the system directly, say with SuperLU
> or MUMPS, you could get the actual inverse? I looked briefly through
> the manual and documentation, but it didn't jump out at me.
This makes several time this week people have asked for inverses. Never
never never use the inverse. Its not stable. The storage blows up. That is
why factorizations were invented. Numerical analysis courses have failed
the country entirely. Just use a KSP and tell it -ksp_type preonly -pc_type lu
and then you can customize the matrix type for different solvers. KSPSolve()
will apply the matrix. If you want to get the action on an entire matrix, this
is dense and we would have to put in the BLAS3 triangular solve calls.
Matt
> Any advice here?
>
> Thanks, Randy
>
> --
> Randall Mackie
> GSY-USA, Inc.
> PMB# 643
> 2261 Market St.,
> San Francisco, CA 94114-1600
> Tel (415) 469-8649
> Fax (415) 469-5044
>
> California Registered Geophysicist
> License No. GP 1034
>
>
--
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
More information about the petsc-users
mailing list