[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: get the preconditioner matrix




Again, this does not make sense. Prometheus as a dense matrix will 1) require much much to much memory and 2) take much to long to apply O(n^2) flops. The whole idea behind multilevel methods is to be roughly order O(n) to apply.

  If Mark has provided a PCView() and PCLoad() for Prometheus
then it could be saved and reused (but it would not be saved
as a dense matrix), BUT I don't think Mark has done this (plus
it would very likely require rerunning on the same number of
processors).

  You just need to calculate the preconditioner for each time
you run the program.

   Barry

On Thu, 13 Apr 2006, Letian Wang wrote:

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