When using GAMG+cg for linear elasticity and providing the near nullspace computed by MatNullSpaceCreateRigidBody(), I used to find "experimentally" that a small value of -pc_gamg_threshold in the order of 0.0001 would slightly decrease the solve time.
Starting with 3.18, I started seeing that any positive value for the treshold would increase the solve time. I did a quick parametric (serial) run solving an elastic problem with a matrix size of approx 570k x 570k for different values of GAMG threshold and different PETSc versions (compiled with the same compiler, options and flags). I noted that 1. starting from 3.18, a threshold of 0.0001 that used to improve the speed now worsens it. 2. PETSc 3.17 looks like a "sweet spot" of speed I would like to hear any comments you might have. The wall time shown includes the time needed to read the mesh and assemble the stiffness matrix. It is a refined version of the NAFEMS LE10 benchmark described here: https://seamplex.com/feenox/examples/mechanical.html#nafems-le10-thick-plate-pressure-benchmark If you want, I could dump the matrix, rhs and near nullspace vectors and share them. -- jeremy theler
threshold.pdf
Description: Adobe PDF document
15 30.06 16 30.44 17 26.29 18 28.61 19 29.65
15 29.23 16 29.54 17 24.70 18 29.44 19 30.58
15 30.11 16 30.51 17 25.80 18 32.68 19 33.78
15 31.68 16 31.96 17 26.98 18 43.36 19 44.24
15 36.74 16 37.06 17 31.96 18 69.54 19 70.14
