Open bornhoft opened 3 years ago
I know I'm getting to this late, but I just want to point out that the original motivation for putting quad order in the physics module (which is how it's done in the old C code) is that different equation sets can have different nonlinear fluxes that would call for different quadrature orders. For instance, it's been found that for the Euler equations (whose fluxes are rational functions), a certain quadrature order (~2p+1) is required to achieve optimal accuracy in general. For an equation set with a different flux, that quadrature order can be different.
I wouldn't say moving it outside of physics (or at least having an option to override that or something) is a bad idea - it's ultimately up to the people actually actively working on the repo anyway - but just wanted to provide some context.
Thats helpful. Thanks for the clarity! I appreciate it. For example, when doing diffusion fluxes, is it typical to do a higher quad order than when just doing Euler equations? (Something I noticed in the DG-Legion code vs Quail)
Not that I'm aware of, but it's definitely possible that the viscous fluxes should be computed with a higher quadrature order. What does DG-Legion do?
Also, to provide a bit more background (which you may already be aware of), using a high quadrature order (known as overintegration) can not only improve accuracy, but also increase robustness (particularly for underresolved flows - it won't stabilize shocks by itself) by reducing aliasing-induced instabilities. That's not to say that you absolutely need a quadrature order of at least 2p+1. Collocated schemes in general don't achieve that order, but optimal accuracy has still been reported for many test cases with such schemes.
Currently the quad order is determined by the physics, but this should really be set in numerics somewhere as it is a function of the quadrature rule, not the physics that are being solved. Basically the action would be to move get_quadrature_order from physics to somewhere in numerics.