geodynamics / aspect

A parallel, extensible finite element code to simulate convection in both 2D and 3D models.
https://aspect.geodynamics.org/
Other
223 stars 235 forks source link

Geometric Multigrid for faster linear solvers #2767

Open tjhei opened 5 years ago

tjhei commented 5 years ago

issue to track progress for GMG that @tcclevenger is working on:

tcclevenger commented 5 years ago

An update: Currently we have a matrix-free Stokes block/solver for prescribed velocity boundary (all meshes) and free-slip boundary (box only). We use GMG for velocity block. Must use cell-wise averaging.

Still needed:

  1. Free-slip boundary for sphere/spherical shell. (current: works in 2D serial, should be simple fix for parallel, will require dealii-developer version, 3D should be logical extension)
  2. Relax the requirement for cell-wise averaging. Options: store all quadrature points (not ideal) or project with higher order finite element.
  3. Compressibility (should be easy for basic case, already implemented in part, but not tested)
  4. Free surface
  5. BFBT for schur complement
  6. Melt transport
maxrudolph commented 4 years ago

Would it be difficult to extend the GMG to work for periodic boundary conditions? I would be interested in using it for a 3D cartesian model with periodic x- and y- boundary conditions.

tjhei commented 4 years ago

Would it be difficult to extend the GMG to work for periodic boundary conditions? I would be interested in using it for a 3D cartesian model with periodic x- and y- boundary conditions.

I was thinking about that when you posted your test case the other day. :-) It is likely not too difficult to make it work. Conrad said he would try to do it at some time this spring. He will talk about this (and other plans) at the virtual hackathon tomorrow.

tcclevenger commented 4 years ago

Yes, I’ll mention this tomorrow. All the required stuff should already be in DEALII so it will hopefully not be too much work to add the functionality to aspect. I’ll keep you updated.

tcclevenger commented 4 years ago

@gassmoeller and @tjhei Here are some initial results for the viscosity projection:

Here we have the u and p, L1 and L2 errors (and rates below) for AMG with "none" set as averaging, GMG with harmonic averaging, GMG with DGQ(2) and DGQ(1) viscosity averaging.

hollow_sphere

My takeaways:

  1. AMG with no averaging has almost identical errors/rates as GMG with the DGQ(2) projection.
  2. GMG with DGQ(1) has slightly smaller errors (similar rates) to DGQ(2).

This seems promising. Thoughts? What other problems would be interesting to test with?

tjhei commented 4 years ago

Thoughts?

Interestingly, DGQ1 gives slightly better errors and same rates compared to DGQ2 and the reference. I thought there are cases where this is not the case and DGQ1 gives lower accuracy. @gassmoeller ?

What other problems would be interesting to test with?

solkz (matching and non-matching) and inclusion come to mind. For Q1 you might be able to do this without worrying about over/undershoots.

gassmoeller commented 4 years ago

Ah, I do not remember the details of what we discussed, but I might have misled you. I checked our paper again were we made the convergence rate analysis and the numerical tests (https://academic.oup.com/gji/article-pdf/219/3/1915/30105955/ggz405.pdf). DGQ(1) for viscosity has the same rate as the bilinear least-squares fit we used in the paper, and will allow us a third order rate for velocity and second order for pressure (so an optimal rate for a Q2Q1 element). However, it will not allow us any higher rates. So if you would combine DGQ(1) with a Q3Q2 element you should still see the same (now sub-optimal) rates. So for our purposes in ASPECT DGQ(1) is absolutely enough, which should make dealing with overshoots simpler.

tjhei commented 3 years ago

4251 extends supported boundary conditions.

4217 implements Newton derivatives (first Part)

maxrudolph commented 3 years ago

Hi @tjhei - I tried to use this most recent version for a 3D spherical geometry problem with prescribed velocity boundary conditions and got a convergence failure during the initial refinement. The same problem does converge using the block AMG solver. Do you have any guidance on this? Also, I am using the Q2Q1 element for velocity/pressure. Should I be using a DG element for pressure with this solver? Also - is it possible to resume from a checkpoint and switch from block AMG to block GMG, or to fall back on block AMG if block GMG fails to converge?

tjhei commented 3 years ago

I know things are not ideal for free slip and things work for 0 velocity. I have not tested with other prescribed velocities. Do you have an easy test prm where I can see the problem?

maxrudolph commented 3 years ago

I have a test .prm file. But it is not easy. After the initial refinement, this model has about 500 million degrees of freedom.

The necessary viscosity profile and initial temperature profile are here: https://github.com/maxrudolph/aspect-energy-equation/tree/master/plates-amr The initial plate motion stage is here: https://github.com/maxrudolph/aspect-energy-equation/tree/master/rcf-testcase/ZZ%2BS200

convection-plates-spinup_aspect-mpiio_amr3_time0.prm.txt