Skip to content
Snippets Groups Projects

Improvements to TOV evolutions, pt 2

Merged Florian Atteneder requested to merge fa/grhd-av-2 into main
1 file
+ 12
3
Compare changes
  • Side-by-side
  • Inline
+ 12
3
@@ -185,9 +185,18 @@ function callback_hrsc(state_u, state_t, env, P, isperiodic, hrsc::HRSC.Smoothed
@unpack cache, mesh = env
@unpack smoothed_mu = get_static_variables(cache)
hrsc.smoother(smoothed_mu, mu, mesh, false)
max_D = maximum(D)
min_D = minimum(D)
smoothed_mu .*= (D .- min_D) / max_D
# min_D, max_D = extrema(D)
# max_D = maximum(D)
# min_D = minimum(D)
# smoothed_mu .*= (D .- min_D) / max_D
# @. smoothed_mu *= D * min_D / max_D
K, = env.mesh.tree.dims
mat_D = dg1d.vreshape(D, layout(env.mesh))
mat_smoothed_mu = dg1d.vreshape(smoothed_mu, layout(env.mesh))
for k in 1:K
min_D, max_D = extrema(@views mat_D[:,k])
@. @views mat_smoothed_mu[:,k] *= mat_D[:,k] * min_D / max_D
end
end
Loading