Matt,
I suspect it is my collegue who asked the earlier questions about
matrix inverses this week, although I didn't realize that until
after I sent my original message.
I also suggested he just get the LU factorizations, but he insists
he needs the actual values to embed in another larger system
he'll solve.
I suppose that with the LU factorizations, you can just do
successive solves with a vector with zeros and a 1 in the appropriate
place to generate the elements you need, no?
I've asked him for more clarification on what he needs exactly.
Thanks, Randy
Matthew Knepley wrote:
On 9/21/07, Randall Mackie <randy@xxxxxxxxxxxx> wrote:
Matt,
There may be very valid reasons why one would want a matrix inverse,
say in the context of solving optimizations where you need the
inverse of the covariance matrix, and you need those values to
embed in another system.
I do not agree. What are you going to do with the inverse that cannot be
done with LU? Backsolves against a matrix are commonplace.
Matt
In this case, just getting the action of the inverse times a vector
is not what is needed.
Randy
Matthew Knepley wrote:
On 9/21/07, Randall Mackie <randy@xxxxxxxxxxxx> 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
--
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