[petsc-users] Inquiry about the interpolation and restriction matrix for PCMG

Xiaodong Liu xliu29 at ncsu.edu
Fri Mar 20 17:25:03 CDT 2020


Hi, Petsc team,

I am practising  PCMG using the following case (3DQ1)
https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex45.c.html


I have several questions.
*1)  About the interpolation and restriction matrix*

For both Galerkin and non-Galerkin type, the interpolation matrix P  is
based on the trilinear interpolation (*I found the source code*) and the
restriction one R is 1/8*P^T?
*Could you please tell me where  the source code to define the restriction
matrix is? *
*2) About the operator on the coarse level*

 It is straightforward to calculate the operator on the coarse level  for
Galerkin type by R*A*P. But how did you define the operator for
non-Galerkin type? Did you use DMRestrict ? Could you please tell me where
is the source code to define
(*link->restricthook)(fine,restrct,rscale,inject,coarse,link->ctx);
in
2933: PetscErrorCode DMRestrict(DM fine,Mat restrct,Vec rscale,Mat
inject,DM coarse)
2934: {
2935:   PetscErrorCode    ierr;
2936:   DMCoarsenHookLink link;

2939:   for (link=fine->coarsenhook; link; link=link->next) {
2940:     if (link->restricthook) {
2941:
(*link->restricthook)(fine,restrct,rscale,inject,coarse,link->ctx);
2942:     }
2943:   }
2944:   return(0);
2945: }
on
https://www.mcs.anl.gov/petsc/petsc-current/src/dm/interface/dm.c.html#DMRestrict


Thanks a lot !
Take care!
Xiaodong



Xiaodong Liu, PhD
X: Computational Physics Division
Los Alamos National Laboratory
P.O. Box 1663,
Los Alamos, NM 87544
505-709-0534
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200320/39d9f915/attachment.html>


More information about the petsc-users mailing list