diff --git a/src/TCI/minmod.jl b/src/TCI/minmod.jl index 192019cb6d6bd855416668571d0940faeb2816f0..c87c0a0113b85445ee63d8f7bf764873baf1228c 100644 --- a/src/TCI/minmod.jl +++ b/src/TCI/minmod.jl @@ -11,7 +11,6 @@ function compute_indicator!( tci::Minmod) @unpack mesh = tci - @unpack D = mesh.element @unpack invdetJ = get_static_variables(mesh.cache) Npts, K = layout(mesh) diff --git a/src/TCI/modaldecayaverage.jl b/src/TCI/modaldecayaverage.jl index a4f19ed11ffbea7607e6e2e75d0dd59d9dadbe2b..12b20c653a35555b0c1e4c9c344e63365b40b926 100644 --- a/src/TCI/modaldecayaverage.jl +++ b/src/TCI/modaldecayaverage.jl @@ -2,7 +2,8 @@ Base.@kwdef struct ModalDecayAverage{T_Mesh<:Mesh1d} <: AbstractTCI mesh::T_Mesh threshold_min::Float64 threshold_max::Float64 - # buffers + # helpers/buffers + invV::Matrix{Float64} uh::Vector{Float64} uh_perfect::Vector{Float64} uh_mod::Vector{Float64} @@ -29,7 +30,10 @@ function ModalDecayAverage(mesh, threshold_min, threshold_max) lsq_x = @. - log(rng_N) lsq_y = deepcopy(lsq_x) - return ModalDecayAverage(mesh, threshold_min, threshold_max, + V = dg1d.vandermonde_matrix_legendre(mesh.element.z) + invV = inv(V) + + return ModalDecayAverage(mesh, threshold_min, threshold_max, invV, uh, uh_perfect, uh_mod, lsq_x, lsq_y) end @@ -39,9 +43,8 @@ function compute_indicator!( u, # inputs tci::ModalDecayAverage) - @unpack mesh, threshold_min, threshold_max, uh, + @unpack mesh, threshold_min, threshold_max, uh, invV, uh_mod, uh_perfect, lsq_x, lsq_y = tci - @unpack D, invV = mesh.element L = layout(mesh) Npts, K = L diff --git a/src/TCI/modaldecayhighest.jl b/src/TCI/modaldecayhighest.jl index 2194ed328b849d354038335d4259716a172f88b3..86e003b0b44fb876c16f55a0151951002608be08 100644 --- a/src/TCI/modaldecayhighest.jl +++ b/src/TCI/modaldecayhighest.jl @@ -2,7 +2,9 @@ Base.@kwdef struct ModalDecayHighest{T_Mesh<:Mesh1d} <: AbstractTCI mesh::T_Mesh threshold_min::Float64 threshold_max::Float64 - # buffers + # helpers/buffers + V::Matrix{Float64} + invV::Matrix{Float64} uh_mod::Vector{Float64} uh_mod_high::Vector{Float64} end @@ -14,7 +16,9 @@ function ModalDecayHighest(mesh, threshold_min, threshold_max) # storage for modal coefficients uh_mod = zeros(Float64, Npts) uh_mod_high = zeros(Float64, Npts) - return ModalDecayHighest(mesh, threshold_min, threshold_max, uh_mod, uh_mod_high) + V = dg1d.vandermonde_matrix_legendre(mesh.element.z) + invV = inv(V) + return ModalDecayHighest(mesh, threshold_min, threshold_max, V, invV, uh_mod, uh_mod_high) end