Are there any drawbacks to using the Method of Manufactured Solutions for convergence testing and verification studies? I really can't think of any.
1 Answers
I think MMS is generally a good technique.
If I were to offer criticism, however, it would be that in my discipline (electromagnetic radiation and scattering), it leads one to spending time/money on implementing mathematics that really don't correspond to actual use cases. MMS requires injecting arbitrary dirichlet/neumann/robin data on boundaries and arbitrary volume sources, but real physical models don't actually use these (they use port boundary conditions, modal expansion boundary conditions, total-field/scattered-field decompositions for sources.. all of these are weirder constructions that fall outside the scope of basic MMS). Overall this makes MMS feel rather tautological: it insists of me that I write extra code that is only of use/coveraged by MMS itself, and yet MMS remains rather silent when it comes to bigger/harder questions.
As an alternative to implementing MMS for electromagnetism, I recommend instead to implement cavity eigenproblem tests (ie compute resonant frequencies of a closed cavity of canonical shape, subject to zero-valued dirichlet or neumann conditions). It can tell you similar things as MMS: am I obtaining the correct rates of convergence as I fiddle with geometry/basis orders and mesh density. Unlike MMS, this doesn't require any additional nonzero boundary-data/body-load terms. And yet, it actually solves a physical problem of genuine engineering interest! (resonant frequencies of general shapes). It does carry the drawback of more complicated algebraic machinery (solving a sparse eigenproblem instead of sparse linear system), but there are good black-box libraries for either case.
All that said, my opinion is shaped by my domain of interest (linear electromagnetism), so other PDE's might not have such a tidy/useful alternative to MMS. I certainly won't criticize other practitioners for thorough testing! It's more a sentiment that, in my use cases, MMS entails additional work but doesn't give very much additional information.
- 4,862
- 13
- 22
MMS is weak at exercising real-world scenarios, but strong at verifying mathematical properties of a solver. This is important because a test shouldn't verify too many properties simultaneously so that when it fails we know why it failed.
All solvers are built from some theoretical/mathematical idea of what should work on the given physics, MMS verifies that those assumptions are correct.
– Reid.Atcheson May 10 '18 at 20:15