-
Notifications
You must be signed in to change notification settings - Fork 4
Description
As discussed at the first TrixiAtmo meeting two weeks ago, one possible strategy for implementing a perturbation formulation is to store a reference solution field in the cache, and give the flux function access to the cache, similarly to what I propose for the covariant form (which requires accessing geometric information from cache.elements) in #31.
This would be quite easy to add to my covariant form implementation, as the cache is already a parameter in the flux and source terms there. For more standard Cartesian formulations, this would require new kernels to be defined, which could be used more generally as a way of dealing with variable-coefficient problems. While passing the cache into the flux is a bit ugly, the "classical" way of treating variable coefficients as dummy variables (i.e. solution variables to which no flux is applied) is arguably even more of a hack, as is the alternative of subtracting the steady-state right-hand side at every residual evaluation.
I'd be happy to hear any ideas people may have about how to best implement a perturbation form (or variable coefficients more generally) and if they'd find this cache approach to be useful as an alternative to the "dummy variables" or "subtract the steady state" techniques.