[petsc-users] Questions about multigrid preconditioner and multigrid level

Smith, Barry F. bsmith at mcs.anl.gov
Thu Sep 19 23:08:50 CDT 2019



  You didn't indicate "why" you can't use multiple levels with "130 grids", is there some error message? Nor do you mention if you have periodic boundary conditions or are using cell or vertex centered unknowns. All of these things affect when you can coarsen for multigrain or not.

  Consider one simple case, Dirichlet boundary conditions with vertex centered unknowns, I show the fine | and coarse grid *


   |                  |                   |                      |                          |

   *                                     *                                                 *


   Now consider 4 points, 
   
   |                  |                   |                      |
                                 
   Where am I going to put the coarse points?

   It is possible to do multigrid with non-nesting of degrees for freedom like 

   |                 |                   |                  |
   *                          *                            *

 but that is really uncommon, nobody does it. People just use the grid sizes which have a natural hierarchy of 
nested coarser grids.

   Barry

  

> On Sep 19, 2019, at 10:48 PM, Young Hyun Jo via petsc-users <petsc-users at mcs.anl.gov> wrote:
> 
> 
> Hello, I'm Young Hyun Jo, and I study plasma physics and particle-in-cell simulation.
> Currently, I'm using PETSc to solve a 3D Poisson's equation in the FDM scheme.
> I have one question about the multigrid preconditioner.
> When I use PCG(KSPCG) with the multigrid preconditioner(PCMG), I get an error if I don't use the appropriate multigrid level for the grid number.
> For example, If I use 129 grids, I can use 7 multigrid levels.
> However, If I use 130 grids, I can't use any multigrid levels but one.
> So, It seems that the grid number is better to be (2*n + 1) to use multigrid preconditioner.
> Is this correct that the multigrid conditioner has some restrictions for the grid number to use?
> It will be really helpful for me to use PETSc properly.
> Thanks in advance.
> 
> Sincerely,
> Young Hyun Jo



More information about the petsc-users mailing list