Skip to content

Commit

Permalink
Merge branch 'main' into jc/StartUpDG_v1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jlchan authored Sep 4, 2024
2 parents 551dec3 + 89f7b7d commit 6658565
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion examples/tree_2d_dgsem/elixir_euler_vortex_amr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function (indicator_vortex::IndicatorVortex)(u::AbstractArray{<:Any, 4},
t, kwargs...)
mesh = indicator_vortex.cache.mesh
alpha = indicator_vortex.cache.alpha
indicator_threaded = indicator_vortex.cache.indicator_threaded
resize!(alpha, nelements(dg, cache))

# get analytical vortex center (based on assumption that center=[0.0,0.0]
Expand Down Expand Up @@ -57,6 +56,11 @@ function periodic_distance_2d(coordinates, center, domain_length)
return sqrt(sum(abs2, dx_periodic))
end

# Optional: Nicer display of the indicator
function Base.show(io::IO, ::MIME"text/plain", indicator::IndicatorVortex)
Trixi.summary_box(io, "IndicatorVortex")
end

end # module TrixiExtension

import .TrixiExtension
Expand Down

0 comments on commit 6658565

Please sign in to comment.