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

Xiaodong Liu xliu29 at ncsu.edu
Fri Mar 20 22:28:31 CDT 2020


Thanks a lot, Matthew and Mark !
Take care.
Xiaodong Liu, PhD
X: Computational Physics Division
Los Alamos National Laboratory
P.O. Box 1663,
Los Alamos, NM 87544
505-709-0534


On Fri, Mar 20, 2020 at 6:50 PM Matthew Knepley <knepley at gmail.com> wrote:

> On Fri, Mar 20, 2020 at 6:26 PM Xiaodong Liu <xliu29 at ncsu.edu> wrote:
>
>> 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?
>>
>
> non-Galerkin usually means rediscretization, where the user explicitly
> supplies the coarser operations, using
>
>
> https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCMGSetOperators.html
>
>    Thanks,
>
>       Matt
>
>
>> 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
>>
>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200320/f176e2f5/attachment.html>


More information about the petsc-users mailing list