[petsc-users] Regarding ksp ex42 - Citations

Barry Smith bsmith at mcs.anl.gov
Sun Aug 7 14:19:59 CDT 2016


$ git checkout barry/extend-pcmg-galerkin
Switched to branch 'barry/extend-pcmg-galerkin'
Your branch is up-to-date with 'origin/barry/extend-pcmg-galerkin'.
~/Src/petsc (barry/extend-pcmg-galerkin=) arch-basic
$ git log 
commit 69aca0b8a5a19c0ddd266601f4ca39e70e8b369f
Author: Barry Smith <bsmith at mcs.anl.gov>
Date:   Sun Jul 24 10:37:46 2016 -0500

    fixed use of integers for mg->galerkin
    
    Reported-by: nightly tests

commit 2134b1e4b80e7da7410bde701042d857987f373d
Author: Barry Smith <bsmith at mcs.anl.gov>
Date:   Sat Jul 23 19:44:19 2016 -0500

    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
    
    This allows computing either mat, or pmat or both via the Galerkin process
    
    Time: 16 hours
    Reported-by: domenico lahaye <domenico_lahaye at yahoo.com>
    Thanks-to: Lawrence Mitchell <lawrence.mitchell at imperial.ac.uk>


  BTW: the fixes are now in the master branch so you should use that instead anyways.

   Barry


> On Aug 7, 2016, at 1:17 PM, domenico lahaye <domenico_lahaye at yahoo.com> wrote:
> 
> My most sincere apologies for my ignorance in the matter that follows. 
> 
> I am new to git. I performed a checkout of the branch barry/extend-pcmg-galerkin
> and made sure to be in the new branch. I however fail to see the changes that Barry 
> implemented. The git -log output I obtain after the checkout of the branch 
> barry/extend-pcmg-galerkin does not show Barry's commit with ID 
> 
> 2134b1e4b80e7da7410bde701042d857987f373d     
> 
> I am obviously missing something. Can you please help? 
> 
> Domenico. 
> 
> From: Barry Smith <bsmith at mcs.anl.gov>
> To: domenico lahaye <domenico_lahaye at yahoo.com> 
> Cc: "petsc-users at mcs.anl.gov" <petsc-users at mcs.anl.gov>
> Sent: Sunday, July 24, 2016 2:52 AM
> Subject: Re: [petsc-users] Regarding ksp ex42 - Citations
> 
> 
>   Took a little more time than I expected but the branch barry/extend-pcmg-galerkin now supports 
> 
> 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
> This allows computing either mat, or pmat or both via the Galerkin process
> 
> 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.
> 
> 
>   Please let me know if you have any difficulties with it.
> 
> Barry
> 
> > On Jul 22, 2016, at 3:42 AM, domenico lahaye <domenico_lahaye at yahoo.com> wrote:
> > 
> > Dear Barry, 
> >  
> >  Thank you for your suggestion. 
> >  
> >  I will be happy to test drive the new code when available. 
> > 
> >  Kind wishes, Domenico. 
> > 
> > 
> > 
> > From: Barry Smith <bsmith at mcs.anl.gov>
> > To: Lawrence Mitchell <lawrence.mitchell at imperial.ac.uk> 
> > Cc: domenico lahaye <domenico_lahaye at yahoo.com>; PETSc Users List <petsc-users at mcs.anl.gov>
> > Sent: Friday, July 22, 2016 1:41 AM
> > Subject: Re: [petsc-users] Regarding ksp ex42 - Citations
> > 
> > 
> >  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 
> > 
> > typedef enum { PC_MG_GALERKIN_BOTH,PC_MG_GALERKIN_PMAT,PC_MG_GALERKIN_MAT, PC_MG_GALERKIN_NONE
> > } PCMGGalerkinType;
> > 
> > Barry
> > 
> > 
> > 
> > > On Jul 21, 2016, at 6:09 AM, Lawrence Mitchell <lawrence.mitchell at imperial.ac.uk> wrote:
> > > 
> > > 
> > >> On 21 Jul 2016, at 10:55, domenico lahaye <domenico_lahaye at yahoo.com> wrote:
> > >> 
> > >> Apologies for being not sufficient clear in my previous message.
> > >> 
> > >> I would like to be able to Galerkin coarsen A^h to obtain A^H
> > >> and to separately Galerkin coarsen M^h to obtain M^H.
> > >> 
> > >> So, yes, the way in which I currently (partially) understand your
> > >> description of the new DMCreateMatrices would do the job.
> > > 
> > > 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.
> > > 
> > > Cheers,
> > > 
> > > Lawrence
> > > 
> > 
> > 
> 
> 



More information about the petsc-users mailing list