diff --git a/src/solvers/dgsem_tree/indicators_1d.jl b/src/solvers/dgsem_tree/indicators_1d.jl index 8b57348861c..40bfd1e98c7 100644 --- a/src/solvers/dgsem_tree/indicators_1d.jl +++ b/src/solvers/dgsem_tree/indicators_1d.jl @@ -289,6 +289,7 @@ function (indicator_max::IndicatorMax)(u::AbstractArray{<:Any, 3}, kwargs...) @unpack alpha, indicator_threaded = indicator_max.cache resize!(alpha, nelements(dg, cache)) + indicator_variable = indicator_max.variable @threaded for element in eachelement(dg, cache) indicator = indicator_threaded[Threads.threadid()] @@ -296,7 +297,7 @@ function (indicator_max::IndicatorMax)(u::AbstractArray{<:Any, 3}, # Calculate indicator variables at Gauss-Lobatto nodes for i in eachnode(dg) u_local = get_node_vars(u, equations, dg, i, element) - indicator[i] = indicator_max.variable(u_local, equations) + indicator[i] = indicator_variable(u_local, equations) end alpha[element] = maximum(indicator) diff --git a/src/solvers/dgsem_tree/indicators_2d.jl b/src/solvers/dgsem_tree/indicators_2d.jl index 2f34e0eb661..da81b2a1d36 100644 --- a/src/solvers/dgsem_tree/indicators_2d.jl +++ b/src/solvers/dgsem_tree/indicators_2d.jl @@ -323,6 +323,7 @@ function (indicator_max::IndicatorMax)(u::AbstractArray{<:Any, 4}, kwargs...) @unpack alpha, indicator_threaded = indicator_max.cache resize!(alpha, nelements(dg, cache)) + indicator_variable = indicator_max.variable @threaded for element in eachelement(dg, cache) indicator = indicator_threaded[Threads.threadid()] @@ -330,7 +331,7 @@ function (indicator_max::IndicatorMax)(u::AbstractArray{<:Any, 4}, # Calculate indicator variables at Gauss-Lobatto nodes for j in eachnode(dg), i in eachnode(dg) u_local = get_node_vars(u, equations, dg, i, j, element) - indicator[i, j] = indicator_max.variable(u_local, equations) + indicator[i, j] = indicator_variable(u_local, equations) end alpha[element] = maximum(indicator) diff --git a/src/solvers/dgsem_tree/indicators_3d.jl b/src/solvers/dgsem_tree/indicators_3d.jl index 69041ed1298..40362889397 100644 --- a/src/solvers/dgsem_tree/indicators_3d.jl +++ b/src/solvers/dgsem_tree/indicators_3d.jl @@ -234,6 +234,7 @@ function (indicator_max::IndicatorMax)(u::AbstractArray{<:Any, 5}, kwargs...) @unpack alpha, indicator_threaded = indicator_max.cache resize!(alpha, nelements(dg, cache)) + indicator_variable = indicator_max.variable @threaded for element in eachelement(dg, cache) indicator = indicator_threaded[Threads.threadid()] @@ -241,7 +242,7 @@ function (indicator_max::IndicatorMax)(u::AbstractArray{<:Any, 5}, # Calculate indicator variables at Gauss-Lobatto nodes for k in eachnode(dg), j in eachnode(dg), i in eachnode(dg) u_local = get_node_vars(u, equations, dg, i, j, k, element) - indicator[i, j, k] = indicator_max.variable(u_local, equations) + indicator[i, j, k] = indicator_variable(u_local, equations) end alpha[element] = maximum(indicator)