<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_68577"><span id="yui_3_16_0_ym19_1_1470294870157_68671">Thanks. I will look into it. Domenico.</span></div><div id="yui_3_16_0_ym19_1_1470294870157_68577"><br id="yui_3_16_0_ym19_1_1470294870157_68670"></div><div id="yui_3_16_0_ym19_1_1470294870157_68577"><b style="font-family: Arial;" id="yui_3_16_0_ym19_1_1470294870157_68624">From:</b><span style="font-family: Arial; font-size: small;" id="yui_3_16_0_ym19_1_1470294870157_68687"> Barry Smith <bsmith@mcs.anl.gov></span><br></div><div class="qtdSeparateBR"><br><br></div><div class="yahoo_quoted" id="yui_3_16_0_ym19_1_1470294870157_68564" 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_68563"><div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 16px;" id="yui_3_16_0_ym19_1_1470294870157_68562"><div dir="ltr" id="yui_3_16_0_ym19_1_1470294870157_68561"><font size="2" face="Arial" id="yui_3_16_0_ym19_1_1470294870157_68566"> <b id="yui_3_16_0_ym19_1_1470294870157_68634"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1470294870157_68633">To:</span></b> domenico lahaye <domenico_lahaye@yahoo.com> <br><b><span style="font-weight: bold;">Cc:</span></b> PETSc Users List <petsc-users@mcs.anl.gov><br> <b id="yui_3_16_0_ym19_1_1470294870157_68610"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1470294870157_68609">Sent:</span></b> Sunday, August 7, 2016 9:19 PM<br> <b id="yui_3_16_0_ym19_1_1470294870157_68613"><span style="font-weight: bold;" id="yui_3_16_0_ym19_1_1470294870157_68612">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_68615"><br><br clear="none">$ git checkout barry/extend-pcmg-galerkin<br clear="none">Switched to branch 'barry/extend-pcmg-galerkin'<br clear="none">Your branch is up-to-date with 'origin/barry/extend-pcmg-galerkin'.<br clear="none">~/Src/petsc (barry/extend-pcmg-galerkin=) arch-basic<br clear="none">$ git log <br clear="none">commit 69aca0b8a5a19c0ddd266601f4ca39e70e8b369f<br clear="none">Author: Barry Smith <<a shape="rect" ymailto="mailto:bsmith@mcs.anl.gov" href="mailto:bsmith@mcs.anl.gov" id="yui_3_16_0_ym19_1_1470294870157_68639">bsmith@mcs.anl.gov</a>><br clear="none">Date: Sun Jul 24 10:37:46 2016 -0500<br clear="none"><br clear="none"> fixed use of integers for mg->galerkin<br clear="none"> <br clear="none"> Reported-by: nightly tests<br clear="none"><br clear="none">commit 2134b1e4b80e7da7410bde701042d857987f373d<br clear="none">Author: 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">Date: Sat Jul 23 19:44:19 2016 -0500<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"> <br clear="none"> This allows computing either mat, or pmat or both via the Galerkin process<br clear="none"> <br clear="none"> Time: 16 hours<br clear="none"> Reported-by: domenico lahaye <<a shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>><br clear="none"> Thanks-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"><br clear="none"><br clear="none"> BTW: the fixes are now in the master branch so you should use that instead anyways.<br clear="none"><br clear="none"> Barry<br clear="none"><br clear="none"><div class="yqt0018969770" id="yqtfd36801"><br clear="none">> On Aug 7, 2016, at 1:17 PM, 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">> My most sincere apologies for my ignorance in the matter that follows. <br clear="none">> <br clear="none">> I am new to git. I performed a checkout of the branch barry/extend-pcmg-galerkin<br clear="none">> and made sure to be in the new branch. I however fail to see the changes that Barry <br clear="none">> implemented. The git -log output I obtain after the checkout of the branch <br clear="none">> barry/extend-pcmg-galerkin does not show Barry's commit with ID <br clear="none">> <br clear="none">> 2134b1e4b80e7da7410bde701042d857987f373d <br clear="none">> <br clear="none">> I am obviously missing something. Can you please help? <br clear="none">> <br clear="none">> Domenico. <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: domenico lahaye <<a shape="rect" ymailto="mailto:domenico_lahaye@yahoo.com" href="mailto:domenico_lahaye@yahoo.com">domenico_lahaye@yahoo.com</a>> <br clear="none">> Cc: "<a shape="rect" ymailto="mailto:petsc-users@mcs.anl.gov" href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>" <<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: Sunday, July 24, 2016 2:52 AM<br clear="none">> Subject: Re: [petsc-users] Regarding ksp ex42 - Citations<br clear="none">> <br clear="none">> <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">> <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">> <br clear="none">> <br clear="none"></div><br><br></div> </div> </div> </div></div></body></html>