Multigrid solver


The geometric MG method is implemented in PPM as a fast iterative method for solving the Poisson equation. The advantage of parallel MG solvers over their FFT-based counterparts is that the former restrict communication to the ghost layers whereas FFTs require several global mappings to transpose the field. This advantage is particularly significant on distributed memory machines, where the bandwidth of the network connection may become the performance limiting factor in FFT solvers.


The PPM MG supports both the V and W cycle (Trottenberg et. al., 2001). The Laplacian is discretized using five and seven point stencils in two and three dimensions, respectively. As residual smoother we employ the RB-SOR (Red-Black Successive Over-Relaxation) scheme. The optimal value for the over-relaxation parameter ω is approximately 1.15 (Yavneh, 1996). By setting ω = 1 one obtains the RB-GS (Red-Black Gauss-Seidel) smoother. Furthermore, the full-weighting scheme (Trottenberg et. al., 2001) is used for the restriction of the residual and bilinear (in two dimensions) or trilinear (in three dimensions) interpolation for the prolongation of the function corrections (Trottenberg et. al., 2001).


The PPM MG solves the two and three dimensional Poisson equation for scalar and vector fields. Boundary conditions can be periodic, Neumann, or Dirichlet. In the vector case each component can satisfy different boundary conditions. The solver is structured into initialization, actual computation, and finalization. In ppm_mg_init, we allocate all the fields that will be needed later and decide which components of the MG to use. In ppm_mg_solve the actual computation is taking place by re-using the previously allocated arrays and ppm_mg_finalize deallocates all internal buffers. This ensures that operations related to memory management are performed only once.