[petsc-users] Hybrid multigrid
Anton Popov
popov at uni-mainz.de
Fri Apr 11 02:08:51 CDT 2025
Thanks Barry!
Best,
Anton
On 10.04.25 21:17, Barry Smith wrote:
> Sounds correct.
>
>> On Apr 10, 2025, at 2:04 PM, Anton Popov <popov at uni-mainz.de> wrote:
>>
>>
>> Hi guys,
>>
>> I have a custom multigrid preconditioner that uses Galerkin
>> coarsening for the staggered grid finite difference. Now I want to
>> replace a few top level operators with the matrix-free shell matrices.
>>
>> Here is my plan:
>>
>> 1. Set PC_MG_GALERKIN_NONE
>>
>> 2. Call PCMGSetRestriction and PCMGSetInterpolation on all levels as
>> I do it already
>>
>> 3. Use a combination of PCMGGetSmoother and KSPSetOperators to
>> communicate my operators with PCMG
>>
>> a. On the top levels just set the shell matrices minimalistically
>> equipped withMATOP_GET_DIAGONALand MATOP_MULT.
>>
>> b. On the bottom levels generate the operators by explicitly
>> calling MatMatMatMult (R is not the same as P in my case).
>>
>>
>> Use MAT_INITIAL_MATRIX for the first time
>>
>> Use MAT_REUSE_MATRIX for the subsequent calls
>>
>>
>> Is this a proper way to do it, or there is something wrong?
>>
>> If I want the restriction/interpolation matrices to be matrix-free on
>> the top levels as well, I would need to setMATOP_MULT_ADDfor them. Is
>> this enough, or do I need something else?
>>
>> Thanks!
>>
>> Anton
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20250411/9851776a/attachment-0001.html>
More information about the petsc-users
mailing list