<html><head></head><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1470294870157_58211">My most sincere apologies for my ignorance in the matter that follows. </div><div id="yui_3_16_0_ym19_1_1470294870157_58211"><br id="yui_3_16_0_ym19_1_1470294870157_58606"></div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr">I am new to git. I performed a checkout of the branch barry/extend-pcmg-galerkin</div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr">and made sure to be in the new branch. I however fail to see the changes that Barry </div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr">implemented. The git -log output I obtain after the checkout of the branch </div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr">barry/extend-pcmg-galerkin does not show Barry's commit with ID </div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr"><span style="font-family: Tahoma; font-size: 13px;"><br></span></div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr"><span id="yui_3_16_0_ym19_1_1470294870157_58769" style="font-family: Tahoma; font-size: 13px;">2134b1e4b80e7da7410bde701042d857987f373d</span>     <br></div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr">I am obviously missing something. Can you please help? </div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr"><br></div><div id="yui_3_16_0_ym19_1_1470294870157_58211" dir="ltr">Domenico. </div><div class="qtdSeparateBR" id="yui_3_16_0_ym19_1_1470294870157_58226"><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1470294870157_58250" style="display: block;">  <div style="font-family: times new roman, new york, times, serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1470294870157_58249"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1470294870157_58248"> <div dir="ltr" id="yui_3_16_0_ym19_1_1470294870157_58247"> <font size="2" face="Arial" id="yui_3_16_0_ym19_1_1470294870157_58520"> <hr size="1" id="yui_3_16_0_ym19_1_1470294870157_58519"> <b id="yui_3_16_0_ym19_1_1470294870157_58526"><span style="font-weight:bold;" id="yui_3_16_0_ym19_1_1470294870157_58525">From:</span></b> Barry Smith <bsmith@mcs.anl.gov><br> <b><span style="font-weight: bold;">To:</span></b> domenico lahaye <domenico_lahaye@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> "petsc-users@mcs.anl.gov" <petsc-users@mcs.anl.gov><br> <b><span style="font-weight: bold;">Sent:</span></b> Sunday, July 24, 2016 2:52 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [petsc-users] Regarding ksp ex42 - Citations<br> </font> </div> <div class="y_msg_container" id="yui_3_16_0_ym19_1_1470294870157_58523"><br><br clear="none">  Took a little more time than I expected but the branch barry/extend-pcmg-galerkin now supports <br clear="none"><br clear="none">PCMGSetGalerkin() and -pc_mg_galerkin now take PC_MG_GALERKIN_BOTH,PC_MG_GALERKIN_PMAT,PC_MG_GALERKIN_MAT, PC_MG_GALERKIN_NONE as arguments instead of PetscBool<br clear="none">This allows computing either mat, or pmat or both via the Galerkin process<br clear="none"><br clear="none">so you should be able to provide A and M with KSPSetOperators() and then run with -pc_mg_galerkin both to get both generated on the coarse meshes via the Galekin process.  Note that if you use the additional option -pc_use_amat false it will use only the M for both mat and pmat in the multigrid process (while A is only used for the outer Krylov solver definition of the operator.) For some problems this is actually a better approach.<br clear="none"><br clear="none"><br clear="none">  Please let me know if you have any difficulties with it.<br clear="none"><br clear="none">Barry<br clear="none"><div class="yqt3110390501" id="yqtfd04300"><br clear="none">> On Jul 22, 2016, at 3:42 AM, domenico lahaye <<a shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>> wrote:<br clear="none">> <br clear="none">> Dear Barry, <br clear="none">>  <br clear="none">>   Thank you for your suggestion. <br clear="none">>  <br clear="none">>   I will be happy to test drive the new code when available. <br clear="none">> <br clear="none">>   Kind wishes, Domenico. <br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> From: Barry Smith <<a shape="rect" ymailto="mailto:bsmith@mcs.anl.gov" href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>><br clear="none">> To: Lawrence Mitchell <<a shape="rect" ymailto="mailto:lawrence.mitchell@imperial.ac.uk" href="mailto:lawrence.mitchell@imperial.ac.uk">lawrence.mitchell@imperial.ac.uk</a>> <br clear="none">> Cc: domenico lahaye <<a shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>>; PETSc Users List <<a shape="rect" ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br clear="none">> Sent: Friday, July 22, 2016 1:41 AM<br clear="none">> Subject: Re: [petsc-users] Regarding ksp ex42 - Citations<br clear="none">> <br clear="none">> <br clear="none">>   I'll add support for handling both A and M via Galerkin. It is easy to write the code, picking a good simple API that doesn't break anything is more difficult.  I'm leaning to change PCMGSetGalerkin(PC,PetscBool) to PCMGSetGalerkin(PC, PCMGGalerkinType) where <br clear="none">> <br clear="none">> typedef enum { PC_MG_GALERKIN_BOTH,PC_MG_GALERKIN_PMAT,PC_MG_GALERKIN_MAT, PC_MG_GALERKIN_NONE<br clear="none">> } PCMGGalerkinType;<br clear="none">> <br clear="none">> Barry<br clear="none">> <br clear="none">> <br clear="none">> <br clear="none">> > On Jul 21, 2016, at 6:09 AM, Lawrence Mitchell <<a shape="rect" ymailto="mailto:lawrence.mitchell@imperial.ac.uk" href="mailto:lawrence.mitchell@imperial.ac.uk">lawrence.mitchell@imperial.ac.uk</a>> wrote:<br clear="none">> > <br clear="none">> > <br clear="none">> >> On 21 Jul 2016, at 10:55, domenico lahaye <<a shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>> wrote:<br clear="none">> >> <br clear="none">> >> Apologies for being not sufficient clear in my previous message.<br clear="none">> >> <br clear="none">> >> I would like to be able to Galerkin coarsen A^h to obtain A^H<br clear="none">> >> and to separately Galerkin coarsen M^h to obtain M^H.<br clear="none">> >> <br clear="none">> >> So, yes, the way in which I currently (partially) understand your<br clear="none">> >> description of the new DMCreateMatrices would do the job.<br clear="none">> > <br clear="none">> > If you want to separately coarsen A and M via Galerkin, I think it will be easier to just change the code in PCSetUp_MG to handle the case where A and M are different on the coarse levels.  Effectively you just need to replicate the code that computes the coarse grid "B" matrix to separately compute coarse grid A and B matrices and pass them in to KSPSetOperators.<br clear="none">> > <br clear="none">> > Cheers,<br clear="none">> > <br clear="none">> > Lawrence<br clear="none">> > <br clear="none">> <br clear="none">> <br clear="none"></div><br><br></div> </div> </div>  </div></div></body></html>