[petsc-users] Multigrid with defect correction

Matt Landreman matt.landreman at gmail.com
Wed Feb 22 04:53:31 CST 2017


Hi, PETSc developers,

1. Consider solving a linear problem with -pc_type mg, assembling the
matrix using KSPSetComputeOperators(ksp,ComputeMatrix,&user) and
MatSetValuesStencil as in ksp ex25.c.  I’d like Pmat to be different than
Amat (a stable low-order discretization and a high-order discretization,
respectively.) However the two Mat arguments that PETSc passes to
ComputeMatrix appear to be the same object, so Pmat and Amat are forced to
be the same.  (For example in ex25, J==jac). How do I allow Amat and Pmat
to differ?

2. I suppose if the above issue were resolved, the resulting gmres/mg
iteration would amount to doing defect correction on only the finest grid.
Another defect correction method is to use a different Mat for smoothing
and residual computation at every level. (Stable low-order for smoothing,
high-order for residual.) This latter approach is recommended on page 103
of Brandt’s multigrid guide (
http://www.wisdom.weizmann.ac.il/~achi/classics.pdf). What would be the
best way to do this second kind of defect correction in PETSc mg? Perhaps
loop over every multigrid level and
call PCMGSetResidual(pc,l,PCMGResidualDefault,Amat) on each level, after
calling ComputeMatrix to build the appropriately-sized Amat?

3. Is it at all sensible to do this second kind of defect correction with
_algebraic_ multigrid? Perhaps Amat for each level could be formed from the
high-order matrix at the fine level by the Galerkin operator R A P, after
getting all the restriction matrices created by gamg for Pmat?

Thanks,
Matt Landreman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170222/9999fbae/attachment.html>


More information about the petsc-users mailing list