We present a simple and effective multigrid-based Poisson solver of second-order accuracy in both gravitational potential and forces in terms of the one, two and infinity norms. The method is especially suitable for numerical simulations using nested mesh refinement. The Poisson equation is solved from coarse to fine levels using a one-way interface scheme. We introduce anti-symmetrically linear interpolation for evaluating the boundary conditions across the multigrid hierarchy. The spurious forces commonly observed at the interfaces between refinement levels are effectively suppressed. We validate the method using two- and three-dimensional density-force pairs that are sufficiently smooth for probing the order of accuracy.
We present an efficient MPI-parallel geometric multigrid library for quadtree (2D) or octree (3D) grids with adaptive refinement. Cartesian 2D/3D and cylindrical 2D geometries are supported, with second-order discretizations for the elliptic operators. Periodic, Dirichlet, and Neumann boundary conditions can be handled, as well as free-space boundary conditions for 3D Poisson problems, for which we use an FFT-based solver on the coarse grid. Scaling results up to 1792 cores are presented. The library can be used to extend adaptive mesh refinement frameworks with an elliptic solver, which we de…
With the ever-growing number of computing architectures, performance portability is an important aspect of (Lattice QCD) software. The Grid library provides a good framework for writing such code, as it thoroughly separates hardware-specific code from algorithmic functionality and already supports many modern architectures. We describe the implementation of a multigrid solver for Wilson clover fermions in Grid by the RQCD group. We present the features included in our implementation, discuss initial optimization efforts, and compare the performance with another multigrid implementation.
Two new relaxation schemes are proposed for the smoothing step in the geometric multigrid solution of PDEs on 2D and 3D stretched structured grids. The new schemes are characterized by efficient line relaxation on branched sets of lines of alternating colour, where the lines are constructed to be everywhere orthogonal to the local direction of maximum grid clustering. Tweed relaxation is best suited for grid clustering near the boundaries of the computational domain, whereas wireframe relaxation is best suited for grid clustering near the centre of the computational domain. On strongly stretch…
We have developed an efficient algorithm for steady axisymmetrical 2D fluid equations. The algorithm employs multigrid method as well as standard implicit discretization schemes for systems of partial differential equations. Linearity of the multigrid method with respect to the number of grid points allowed us to use $256\times 256$ grid, where we could achieve solutions in several minutes. Time limitations due to nonlinearity of the system are partially avoided by using multi level grids(the initial solution on $256\times 256$ grid was extrapolated steady solution from $128\times 128$ grid wh…
A method is presented to include irregular domain boundaries in a geometric multigrid solver. Dirichlet boundary conditions can be imposed on an irregular boundary defined by a level set function. Our implementation employs quadtree/octree grids with adaptive refinement, a cell-centered discretization and pointwise smoothing. Boundary locations are determined at a subgrid resolution by performing line searches. For grid blocks near the interface, custom operator stencils are stored that take the interface into account. For grid block away from boundaries, a standard second-order accurate discr…
It is shown how various ideas that are well established for the solution of Poisson's equation using plane wave and multigrid methods can be combined with wavelet concepts. The combination of wavelet concepts and multigrid techniques turns out to be particularly fruitful. We propose a modified multigrid V cycle scheme that is not only much simpler, but also more efficient than the standard V cycle. Whereas in the traditional V cycle the residue is passed to the coarser grid levels, this new scheme does not require the calculation of a residue. Instead it works with copies of the charge density…
We propose a simple and efficient one-way multigrid method for self-consistent electronic structure calculations based on iterative diagonalization. Total energy calculations are performed on several different levels of grids starting from the coarsest grid, with wave functions transferred to each finer level. The only changes compared to a single grid calculation are interpolation and orthonormalization steps outside the original total energy calculation and required only for transferring between grids. This feature results in a minimal amount of code change, and enables us to employ a sophis…
In this work we exploit agglomeration based $h$-multigrid preconditioners to speed-up the iterative solution of discontinuous Galerkin discretizations of the Stokes and Navier-Stokes equations. As a distinctive feature $h$-coarsened mesh sequences are generated by recursive agglomeration of a fine grid, admitting arbitrarily unstructured grids of complex domains, and agglomeration based discontinuous Galerkin discretizations are employed to deal with agglomerated elements of coarse levels. Both the expense of building coarse grid operators and the performance of the resulting multigrid iterati…
We present a new multigrid scheme for solving the Poisson equation with Dirichlet boundary conditions on a Cartesian grid with irregular domain boundaries. This scheme was developed in the context of the Adaptive Mesh Refinement (AMR) schemes based on a graded-octree data structure. The Poisson equation is solved on a level-by-level basis, using a "one-way interface" scheme in which boundary conditions are interpolated from the previous coarser level solution. Such a scheme is particularly well suited for self-gravitating astrophysical flows requiring an adaptive time stepping strategy. By con…
This paper proposes a mode multigrid (MMG) method, and applies it to accelerate the convergence of the steady state flow on unstructured grids. The dynamic mode decomposition (DMD) technique is used to analyze the convergence process of steady flow field according to the solution vectors from the previous time steps. Unlike the traditional multigrid method, we project the flowfield solutions from the physical space into the modal space, and truncate all the high-frequency modes but only the first-order mode are retained based on the DMD analysis. The real solutions in the physical space can be…
We describe the object-oriented implementation of a higher-order finite-difference density-functional code in Fortran 90. Object-oriented models of grid and related objects are constructed and employed for the implementation of an efficient one-way multigrid method we have recently proposed for the density-functional electronic-structure calculations. Detailed analysis of performance and strategy of the one-way multigrid scheme will be presented.
The present work develops hybrid multigrid methods for high-order discontinuous Galerkin discretizations of elliptic problems. Fast matrix-free operator evaluation on tensor product elements is used to devise a computationally efficient PDE solver. The multigrid hierarchy exploits all possibilities of geometric, polynomial, and algebraic coarsening, targeting engineering applications on complex geometries. Additionally, a transfer from discontinuous to continuous function spaces is performed within the multigrid hierarchy. This does not only further reduce the problem size of the coarse-grid p…
The past decade has witnessed a dramatic acceleration of lattice quantum chromodynamics calculations in nuclear and particle physics. This has been due to both significant progress in accelerating the iterative linear solvers using multi-grid algorithms, and due to the throughput improvements brought by GPUs. Deploying hierarchical algorithms optimally on GPUs is non-trivial owing to the lack of parallelism on the coarse grids, and as such, these advances have not proved multiplicative. Using the QUDA library, we demonstrate that by exposing all sources of parallelism that the underlying stenc…
We combine the multigrid (MG) method with state-of-the-art concepts from the variational formulation of the numerical renormalization group. The resulting MG renormalization (MGR) method is a natural generalization of the MG method for solving partial differential equations. When the solution on a grid of $N$ points is sought, our MGR method has a computational cost scaling as $\mathcal{O}(\log(N))$, as opposed to $\mathcal{O}(N)$ for the best standard MG method. Therefore MGR can exponentially speed up standard MG computations. To illustrate our method, we develop a novel algorithm for the gr…