[petsc-users] Adapting MatMult and PCMG functions in matrix-free method.

Jed Brown jedbrown at mcs.anl.gov
Thu Jul 5 12:47:03 CDT 2012


Can you reference a paper or some notes on the algorithm?

On Thu, Jul 5, 2012 at 8:40 AM, domenico lahaye
<domenico_lahaye at yahoo.com>wrote:

> Dear PETSc developers,
>
>   Thank you for your support to Abdul.
>
>    We are in the process of developing a multilevel
> Krylov solver for the Helmholtz equation. Abdul
> has implemented Algorithm I for this purpose.
> We next would like to implement Algorithm II.
> Algorithm || amounts to replacing every occurrence
> of the system matrix $A$ in Algorithm I by
> $M^{-1} A$. This replacement should occur on all
> levels. We thought of two ways to realize this
> replacement.
>
> 1) We thought of adopting a matrix-free approach,
> and to plug in the operation with  $M^{-1}$ there.
> This would require a ksp context inside MatMult.
> We wonder whether this a approach is feasible to
> take.
>
> 2) The other approach would by to implement a
> customized pcmg preconditioner that we can adapt
> to our needs. This could be a more elegant approach,
> at the cost of doing more work. Is the assumption
> that the second approach is more elegant correct
> and would you be able to give advice on how to tackle
> this approach?
>
>   Kind wishes, Domenico.
>
>
>   ------------------------------
> **
>
>
>   ----- Forwarded Message -----
> *From:* Matthew Knepley <knepley at gmail.com>
> *To:* Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk>; PETSc users list <
> petsc-users at mcs.anl.gov>
> *Sent:* Thursday, 5 July 2012, 15:45
> *Subject:* Re: [petsc-users] Adapting MatMult and PCMG functions in
> matrix-free method.
>
> On Thu, Jul 5, 2012 at 7:34 AM, Abdul Hanan Sheikh <hanangul12 at yahoo.co.uk
> > wrote:
>
> Dear developers and users,
> Summer greetings.
>  We have few question listen below:
>
> 1.
> The first question is about adapting " MatMult " function in matrix-free
> method.
> We intend to incorporate a KSP context inside "MatMult" . The immediate
> question is how to
> provide more than one matrices as input.
>
>
> You provide extra data through the context for the MATSHELL
>
>
> Is this idea of incorporating a KSP context inside "MatMult" function
> workable ? Does it make any confrontation
> with philosophy of development of Petsc. ?
>
>
> I am not sure you want this. Do you think PCKSP can do what you want?
> There is not enough information here to help us answer.
>
>
> 2.
> An other advance level feedback is needed.
>  Re-implementing PCMG function { mg.c } will lead any violation of
> philosophy of Petsc-development ??
>
>
> Again, there is not enough information. Can you do what you want by just
> replacing the monitors?
>
>   Thanks,
>
>      Matt
>
>
> 3.
> Which one of the above both is more elegant and feasible to work on ?
>
>
> Thanking in anticipation,
> Abdul
>
>
>
>
>
> --
> 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
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120705/2c2aa242/attachment.html>


More information about the petsc-users mailing list