Variational smoother now uses libMesh solver and constraint system
Previously, the VariationalMeshSmoother set up and solved the optimization problem using logic branches for each element type and a separate solver than what libMesh provides.
This PR introduces two new objects to incorporate the variational smoother's solve process into the rest of libMesh: the FEMSystem-derived VariationalSmootherSystem and the Constraint-derived VariationalSmootherConstraint.
The VariationalSmootherSystem computes the residual and analytic Jacobian for the optimization solve. The analytic Jacobian was verified to be correct when compared to finite difference estimations.
The VariationalSmootherConstraint currently constrains boundary nodes and, if requested, subdomain boundary nodes to not move during the smoothing process. Less strict sliding boundary node constraints will be introduced in a future PR.
These changes allowed for a massive cleanup of the VariationalMeshSmootherClass.
Ref. #4082
Ooh - we never talked about the parallel case. That's going to be slightly harder to fix than bad whitespace or a shadowing error.
For now, what we want to do is copy the variational smoother solution vector (which is PARALLEL, with a GHOSTED current_local_solution copy) into a SERIAL vector before using the results from there. That's also the long-term solution for serial (including ReplicatedMesh) meshes, but at some point we might also want to write a code path that sets up the proper ghosting (algebraic ghosting will need to match geometric ghosting, even if the latter has been expanded) on distributed meshes.
Job Coverage, step Generate coverage on 3df510b wanted to post the following:
Coverage
| 6a0857 | #4191 3df510 | ||||
|---|---|---|---|---|---|
| Total | Total | +/- | New | ||
| Rate | 63.70% | 64.27% | +0.57% | 94.25% | |
| Hits | 75765 | 75056 | -709 | 246 | |
| Misses | 43178 | 41725 | -1453 | 15 | |
This comment will be updated on new commits.