<div dir="ltr"><div dir="ltr">On Fri, Mar 20, 2020 at 6:26 PM Xiaodong Liu <<a href="mailto:xliu29@ncsu.edu">xliu29@ncsu.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, Petsc team, <div> </div><div>I am practising PCMG using the following case (3DQ1)</div><div><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex45.c.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/examples/tutorials/ex45.c.html</a> </div><div><br></div><div>I have several questions. </div><div><b>1) About the interpolation and restriction matrix</b></div><div><br></div><div>For both Galerkin and non-Galerkin type, the interpolation matrix P is based on the trilinear interpolation (<i>I found the source code</i>) and the restriction one R is 1/8*P^T?</div><div><i>Could you please tell me where the source code to define the restriction matrix is? </i></div><div><b>2) About the operator on the coarse level</b></div><div><br></div><div> 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?</div></div></blockquote><div><br></div><div>non-Galerkin usually means rediscretization, where the user explicitly supplies the coarser operations, using</div><div><br></div><div> <a href="https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCMGSetOperators.html">https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCMGSetOperators.html</a></div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div> Did you use DMRestrict ? Could you please tell me where is the source code to define </div><div>(*link->restricthook)(fine,restrct,rscale,inject,coarse,link->ctx);<br></div><div>in</div><div>2933: PetscErrorCode DMRestrict(DM fine,Mat restrct,Vec rscale,Mat inject,DM coarse)<br>2934: {<br>2935: PetscErrorCode ierr;<br>2936: DMCoarsenHookLink link;<br><br>2939: for (link=fine->coarsenhook; link; link=link->next) {<br>2940: if (link->restricthook) {<br>2941: (*link->restricthook)(fine,restrct,rscale,inject,coarse,link->ctx);<br>2942: }<br>2943: }<br>2944: return(0);<br>2945: }<br></div><div>on </div><div><a href="https://www.mcs.anl.gov/petsc/petsc-current/src/dm/interface/dm.c.html#DMRestrict" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/src/dm/interface/dm.c.html#DMRestrict</a> <br></div><div><br></div><div>Thanks a lot !</div><div>Take care!</div><div>Xiaodong </div><div><br></div><div> </div><div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div>Xiaodong Liu, PhD<br>X: Computational Physics Division<br>Los Alamos National Laboratory<br>P.O. Box 1663, <br>Los Alamos, NM 87544<br>505-709-0534<br></div></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>