From c6a45301fc797371f765368b33c5c594c5e8c7ba Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Tue, 5 Dec 2023 09:49:58 -0500 Subject: [PATCH] Improve diagnostics inference --- src/diagnostics/diagnostic.jl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/diagnostics/diagnostic.jl b/src/diagnostics/diagnostic.jl index ff3fe9601a..dfa3e83894 100644 --- a/src/diagnostics/diagnostic.jl +++ b/src/diagnostics/diagnostic.jl @@ -216,8 +216,8 @@ include("diagnostics_utils.jl") # have a geometric average. If more complex reduction are needed, this mechanism has to be # changed. -struct ScheduledDiagnosticIterations{T1, T2, OW, F1, F2, PO} - variable::DiagnosticVariable +struct ScheduledDiagnosticIterations{T1, T2, OW, F1, F2, PO, T} + variable::DiagnosticVariable{T} output_every::T1 output_writer::OW reduction_time_func::F1 @@ -301,7 +301,7 @@ struct ScheduledDiagnosticIterations{T1, T2, OW, F1, F2, PO} """ function ScheduledDiagnosticIterations(; - variable::DiagnosticVariable, + variable::DiagnosticVariable{T}, output_every, output_writer, reduction_time_func = nothing, @@ -322,7 +322,7 @@ struct ScheduledDiagnosticIterations{T1, T2, OW, F1, F2, PO} pre_output_hook!; units_are_seconds = false, ), - ) + ) where {T} # We provide an inner constructor to enforce some constraints @@ -352,7 +352,7 @@ struct ScheduledDiagnosticIterations{T1, T2, OW, F1, F2, PO} F2 = typeof(reduction_space_func) PO = typeof(pre_output_hook!) - new{T1, T2, OW, F1, F2, PO}( + new{T1, T2, OW, F1, F2, PO, T}( variable, output_every, output_writer,