[ANN] Announcing GeometricMultigrid.jl

Just a heads-up announcing GeometricMultigrid.jl is now registered, for anyone who is interested.

MGscaling
Benchmark example for mg! solver demonstrating NlogN solution time scaling with the length of the solution vector.


The only clever (?) bit of the implementation is a few custom types. Geometric Multigrid methods make use of the regular spacial connectivity of the grid to define the restriction and prolongation operators. These concepts are built into the package using the FieldVector and FieldMatrix types. These behave like Vector and Matrix types, but they are actually wrappers around multi-dimensional padded arrays which efficiently capture the geometric structure of the data. These along with a recursive SolveState type are enough to define a pretty fast implementation.

Since I only use this for discrete Poisson equations, FieldMatrix is not very general yet. If anyone is interested in using this for other discrete PDEs, we can certainly extend the type.

10 Likes

Glad to see this! There is also GitHub - timholy/RestrictProlong.jl: Efficient multigrid operators for Julia. To be clear, there is no associated solver, just the operators themselves, which is why I’m glad to see this package. But maybe if you’re looking for generalizability it might be worth a look and see if it meets some needs?

2 Likes

Great! Thanks for the heads up.

It’s interesting that you mention the Galerkin condition. I’m working with conservative PDEs, so the summation restriction operation is effectively exact, but I’m not sure what the transpose projection operation is…

As far as generality, looking at your implementation points out a number of geometric assumptions I’ve made. It might be good to chat about what grid your operations are implying and if there is a way to construct a general set of functions.

My package makes its own assumptions. It’s targeted at regularly-spaced grids. Agreed that it’s a challenging problem, but multiple dispatch might come to the rescue? As you can tell from the modification dates of the package, it’s not something I’ve thought about in a while, but it comes up periodically so it remains of interest.