[petsc-users] Geometric multigrid with a cell-centered discretization

Smith, Barry F. bsmith at mcs.anl.gov
Tue Jan 9 08:10:01 CST 2018


  With cell centered elements each element is sliced in half in each of the three directions for refinement (or you can refine only in 1 or 2 of the dimensions if you like). This means that the ratio of mx to MX needs to be 2 (or 4).So your numbers are fine.

> On Jan 9, 2018, at 7:59 AM, Buesing, Henrik <hbuesing at eonerc.rwth-aachen.de> wrote:
> 
> Dear all, 
>  
> I am using DMDACreate3d to generate my domain and a cell-centered two-point flux approximation as discretization. I use geometric Multigrid (-pc_type mg) with DMDASetInterpolationType(petsc_da, DMDA_Q0, petsc_ierr). With DM_BOUNDARY_GHOSTED as boundary type in DMDACreate3d, I get
>  
> [0]PETSC ERROR: Arguments are incompatible
> [0]PETSC ERROR: Ratio between levels: (mx - 1)/(Mx - 1) must be integer: mx 1536 Mx 768  

  We need ALL the output from the error (always). It should never be doing this check in your case so something is wrong with the order of your code perhaps.

   Barry

>  
> With DM_BOUNDARY_PERIODIC, I get invalid accesses when I assemble the matrix. 
> 
> Can I somehow tell him, that I have a cell-centered grid, or do I have to resort to using N+1 in my dimensions? 
> 
> Thank you!
> Henrik
>  
>  
> --
> Dipl.-Math. Henrik Büsing
> Institute for Applied Geophysics and Geothermal Energy
> E.ON Energy Research Center
> RWTH Aachen University
> ------------------------------------------------------
> Mathieustr. 10            |    Tel +49 (0)241 80 49907
> 52074 Aachen, Germany     |    Fax +49 (0)241 80 49889
> ------------------------------------------------------
> http://www.eonerc.rwth-aachen.de/GGE
> hbuesing at eonerc.rwth-aachen.de
> ------------------------------------------------------



More information about the petsc-users mailing list