trixi-framework / trixi-framework/Trixi.jl
Flux functions that depend explicitly on space
- Dominant language
- Julia
- Stars
- 731
- Forks
- 166
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 25
Description
This came up in #356: It would be nice to allow flux functions that depend explicitly on space `x`, e.g. for linear advection with variable coefficients. There are at least two possible approaches:
1. Just provide the space coordinate explicitly as argument to all flux functions (`calcflux` and all numerical fluxes)
2. Create a trait for this property, e.g. `has_variable_coefficients(equations) = Val(false)` as default value and use that for dispatch. This would be similar to our approach for nonconservative terms used in the MHD equations.
If we choose the first approach, we should benchmark carefully whether there are any performance issues with this.
Contributor guide
Assessment
This issue has not been assessed yet.