<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_1_1468944869609_115054"><span>Dear Barry, <br></span></div><div><span> </span></div><div><span> Thank you for your suggestion. <br></span></div><div id="yui_3_16_0_1_1468944869609_115115"><span> </span></div><div id="yui_3_16_0_1_1468944869609_115099"><span id="yui_3_16_0_1_1468944869609_115172"> I will be happy to test drive the new code when available. <br></span></div><div id="yui_3_16_0_1_1468944869609_115174"><span><br> Kind wishes, Domenico. <br></span></div><div id="yui_3_16_0_1_1468944869609_115175"><span><br></span></div><div class="qtdSeparateBR"><br><br></div><div style="display: block;" id="yui_3_16_0_1_1468944869609_115042" class="yahoo_quoted"> <div id="yui_3_16_0_1_1468944869609_115041" style="font-family: times new roman, new york, times, serif; font-size: 16px;"> <div id="yui_3_16_0_1_1468944869609_115040" style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;"> <div id="yui_3_16_0_1_1468944869609_115039" dir="ltr"> <font id="yui_3_16_0_1_1468944869609_115044" face="Arial" size="2"> <hr size="1"> <b><span style="font-weight:bold;">From:</span></b> Barry Smith <bsmith@mcs.anl.gov><br> <b id="yui_3_16_0_1_1468944869609_115098"><span id="yui_3_16_0_1_1468944869609_115097" style="font-weight: bold;">To:</span></b> Lawrence Mitchell <lawrence.mitchell@imperial.ac.uk> <br><b><span style="font-weight: bold;">Cc:</span></b> domenico lahaye <domenico_lahaye@yahoo.com>; PETSc Users List <petsc-users@mcs.anl.gov><br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, July 22, 2016 1:41 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [petsc-users] Regarding ksp ex42 - Citations<br> </font> </div> <div id="yui_3_16_0_1_1468944869609_115043" class="y_msg_container"><br><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"><div class="yqt8375059154" id="yqtfd18268"><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"></div><br><br></div> </div> </div> </div></div></body></html>