Mannually specify a diagonal matrix as a preconditioner?

Shi Jin jinzishuai at yahoo.com
Mon Mar 31 17:05:13 CDT 2008


You do not need another matrix to do lumping. Just give the mass matrix in
both arguments, and then use

  -pc_type jacobi -pc_jacobi_rowsum

   Matt

Thank you Matt.
However, I want to do more than a row sum, which is perfectly fine for first order elements. For higher order elements, I have to use a special quadrature rule to construct the lumped diagonal matrix.

With this in mind, could you please answer my two questions again? Thank you very much.

Shi


On Mon, Mar 31, 2008 at 4:04 PM, Shi Jin <jinzishuai at yahoo.com> wrote:
>
> Hi there,
>
> I am trying to solve a mass matrix linear system by KSPSolve. Right now, I
> am passing the mass matrix itself (let's call it M) to KSPSetOperators() as
> the Pmat argument. In order to speed up the convergence, I have constructed
> the lumped mass matrix (named lumpedM). For a linear finite element, this is
> simply a diagonal matrix with entries equal to the sum of the row on M. It
> is a common practice to replace M with lumpedM to have faster convergence
> without losing the order of accuracy.
>
> What I want to do is to still solve the M matrix but use lumpedM to
> precondition it. This way hopefully the number of iterations would be
> greatly reduced. In Petsc code, I tried
>
>  ierr = KSPSetOperators( solMP, M, lumpedM, SAME_PRECONDITIONER);
>
> However, instead of giving faster convergence, it actually takes more
> iterations to convergence than the regular one. Therefore, I wonder if
> setting lumpedM as Pmat is the correct way to do it. Could you please
> advice? I think right now lumpedM is taken as the input to compute the
> preconditioning matrix, using whatever method is specified by -pc_type .
> What I really want to do is to simply set lumpedM as the precondition
> matrix, without spending time to compute anything.
> Thank you very much.
>
> Shi
>
>
>
>
>
> --
> Shi Jin, PhD
>
>
>  ________________________________
> Like movies? Here's a limited-time offer: Blockbuster Total Access for one
> month at no cost.



-- 
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







      ____________________________________________________________________________________
Like movies? Here's a limited-time offer: Blockbuster Total Access for one month at no cost. 
http://tc.deals.yahoo.com/tc/blockbuster/text4.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20080331/e5ba08d4/attachment.htm>


More information about the petsc-users mailing list