trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
527 stars 104 forks source link

Dispatching of `analyze` for parabolic terms #1347

Open andrewwinters5000 opened 1 year ago

andrewwinters5000 commented 1 year ago

Currently, in analysis.jl there are two versions of the analyze function. The original one (for the hyperbolic solver) dispatches only on semi::AbstractSemidiscretization. A new (experimental) version of analyze for the SemidiscretizationHyperbolicParabolic required the ability to unpack the equations_parabolic and cache_parabolic such that gradients were available to compute additional analysis quantities. In this case, the enstrophy.

The current strategy requires one to dispatch on the analysis quantity quantity::typeof(enstrophy) to avoid errors with the existing analysis quantities. This (cumbersome) way to dispatch on parabolic analysis quantities should be improved. See here for original discussion.

DanielDoehring commented 5 months ago

Related: https://github.com/trixi-framework/Trixi.jl/pull/1893