Barry:
Thank you for your reply. What I want to do is to use PETSc for
optimization. I use Prometheus pre-conditioner to solve the initial problem.
Usually it spends much time on getting the pre-conditioner, then the
iterations are relatively going faster. I'm thinking to save the
pre-conditioner matrix for the initial problem (Now I know I can do that by
PCComputeExplicitOperator), then for other very similar problems, I can pass
the saved pre-conditioner and apply them directly to the new problem. Do you
think it will work?
Is there any routine to apply the saved matrix as pre-conditioner? Or I have
to program an user-defined PC routine?
Thanks.
Letian
-----Original Message-----
From: owner-petsc-users@xxxxxxxxxxx [mailto:owner-petsc-users@xxxxxxxxxxx]
On Behalf Of Barry Smith
Sent: Wednesday, April 12, 2006 7:56 PM
To: petsc-users@xxxxxxxxxxx
Subject: Re: get the preconditioner matrix
Letian,
What do you mean be "pre-conditioner matrix"? It is very rare
that a preconditioner is explicitly represented as a matrix; it is almost
always just some code that applies the operator. In general an explicitly
represented preconditioner would actually be a dense matrix.
If you truly want this dense matrix you can call
PCComputeExplicitOperator()
and store the resulting matrix to a file.
Barry
On Wed, 12 Apr 2006, Letian Wang wrote:
Dear all,
Is it possible to obtain the PETSc pre-conditioner matrix and output it to
a
file? How can I do that? Thanks.
Letian Wang