From 3016993f090a3155472d4f3ee279ef68e787fd81 Mon Sep 17 00:00:00 2001 From: Warisa Date: Tue, 17 Sep 2024 22:57:28 +0700 Subject: [PATCH] generalize type of threshold in 1D gradient algo --- src/shock_point_detectors/1D/gradient.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/shock_point_detectors/1D/gradient.jl b/src/shock_point_detectors/1D/gradient.jl index 813e7f6..899ae79 100644 --- a/src/shock_point_detectors/1D/gradient.jl +++ b/src/shock_point_detectors/1D/gradient.jl @@ -39,9 +39,9 @@ function detect_discon_at_timestep(density_at_t, velocity_at_t, pressure_at_t, x return shock_locations end -struct GradientShockDetectionAlgo <: Abstract1DShockDetectionAlgo - threshold::Float64 -end # GradientEntropyShockDetectionAlgo +struct GradientShockDetectionAlgo{T} <: Abstract1DShockDetectionAlgo + threshold::T +end # GradientShockDetectionAlgo function detect(flow_data::FlowData, alg::GradientShockDetectionAlgo) # Unpack all the values from the detector