Skip to content
Snippets Groups Projects
Commit f5063e7f authored by Florian Atteneder's avatar Florian Atteneder
Browse files

use inplace ops for entropy TCI

parent f180e425
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !71. Comments created here will be created in the context of that merge request.
......@@ -36,7 +36,18 @@ function compute_indicator!(
# entropy residual
dt = t - tm1
dt <= 0 && return # occurs on first time step when no previous entropy is available
EP .= abs.((E - Em1) / dt + 0.5 * D * (F + Fm1) .* invjac)
# use inplace operations
@. Fm1 -= F
mul!(EP, D, Fm1, -1.0, false)
@. EP .*= invjac
@. EP += (E - Em1) / dt
@. EP = abs(EP)
# @. EP = (E - Em1) / dt
# Fm1 .-= F
# mul!(EP, D, Fm1, -1.0, 1.0)
# EP .= abs.((E - Em1) / dt + 0.5 * D * (F + Fm1) .* invjac)
# entropy jumps
for k = 1:K
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment