How to use Trixi Adaptive Mesh Refinement Indicators?

Identifying the most relevant regions is certainly the crucial part in adaptive schemes. For elliptic PDEs there are estimators for the error in the PDE solution, or even in derived cost functionals, with provable effectiveness and efficiency. However, for hyperbolic systems, such theoretical guarantees are, to my knowledge, still lacking and error indicators are mostly heuristic.

In Trixi.jl, IndicatorMax simply monitors the value of a chosen variable. In the example, the peak of the bell-shaped function is therefore nicely captured. IndicatorLoehner calculates a normalized, approximate second derivative of a chosen variable. The intended behavior can be seen in the original paper, where the front of some blast wave is tracked. In the example, it will therefore not capture the peak. (Regarding the refinement observed far away from the bell, my guess is that it is due to near-zero values of the observed quantity, which enter in the normalization.) IndicatorHennemannGassner is more specialized and dedicated to shock capturing.

All indicators are still generic in the sense that you have to pick or compute an appropriate quantity, which will naturally be problem-specific. A common approach would be to define your own variable

function target(u, equations)
  # compute something from the current state
end

and pass this to the indicators.

1 Like