Open agzimmerman opened 6 years ago
While refactoring in another branch, I discovered that reducing the quadrature degree fixed this issue, as was done in commit 9a9e88b7bc31cfc864a717afdf0db6c27256a2dd.
Here's the new output:
tests/test_benchmarks.py::test_lid_driven_cavity_with_solid_subdomain_benchmark Number of cells increased from 2000 to 2040 (2.0% increase). Number of cells increased from 2040 to 2360 (15.7% increase). Number of cells increased from 2360 to 3000 (27.1% increase). Number of cells increased from 3000 to 4280 (42.7% increase). Writing solution to output/benchmarks/lid_driven_cavity_with_solid_subdomain/solution.xdmf Solving nonlinear variational problem. Newton iteration 0: r (abs) = 2.836e+00 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 1.000e-09) Solving linear system of size 21710 x 21710 (PETSc LU solver, umfpack). PETSc Krylov solver starting to solve 21710 x 21710 system. Newton iteration 1: r (abs) = 1.452e-02 (tol = 1.000e-10) r (rel) = 5.120e-03 (tol = 1.000e-09) Solving linear system of size 21710 x 21710 (PETSc LU solver, umfpack). PETSc Krylov solver starting to solve 21710 x 21710 system. Newton iteration 2: r (abs) = 1.110e-03 (tol = 1.000e-10) r (rel) = 3.914e-04 (tol = 1.000e-09) Solving linear system of size 21710 x 21710 (PETSc LU solver, umfpack). PETSc Krylov solver starting to solve 21710 x 21710 system. Newton iteration 3: r (abs) = 1.437e-05 (tol = 1.000e-10) r (rel) = 5.068e-06 (tol = 1.000e-09) Solving linear system of size 21710 x 21710 (PETSc LU solver, umfpack). PETSc Krylov solver starting to solve 21710 x 21710 system. Newton iteration 4: r (abs) = 2.432e-08 (tol = 1.000e-10) r (rel) = 8.572e-09 (tol = 1.000e-09) Solving linear system of size 21710 x 21710 (PETSc LU solver, umfpack). PETSc Krylov solver starting to solve 21710 x 21710 system. Newton iteration 5: r (abs) = 1.493e-14 (tol = 1.000e-10) r (rel) = 5.264e-15 (tol = 1.000e-09) Newton solver finished in 5 iterations and 5 linear solver iterations. Reached time t = 20.0 Writing solution to output/benchmarks/lid_driven_cavity_with_solid_subdomain/solution.xdmf Writing checkpoint file to output/benchmarks/lid_driven_cavity_with_solid_subdomain/checkpoint_t20.0.h5 Reached end time, t = 20.0 Computed bounding box tree with 8559 nodes for 4280 entities. PASSED [ 50%]
I've recently had much success by starting with a large smoothing parameter $r$ and then solving a sequence of problems with progressively smaller $r$, maintaining quadratic convergence of the Newton iterations at every step.