From cd9799162c2dd3d2dd5dbbf2d2a938fbb652ef5e Mon Sep 17 00:00:00 2001 From: Charles Kawczynski Date: Mon, 16 Sep 2024 10:48:27 -0400 Subject: [PATCH] Add Bool assertion in callback loop --- Project.toml | 2 +- src/integrators.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 04444666..9b028987 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ClimaTimeSteppers" uuid = "595c0a79-7f3d-439a-bc5a-b232dc3bde79" authors = ["Climate Modeling Alliance"] -version = "0.7.36" +version = "0.7.37" [deps] ClimaComms = "3a4d1b5c-c61d-41fd-a00a-5873ba7a1b0d" diff --git a/src/integrators.jl b/src/integrators.jl index da68d579..66bd8441 100644 --- a/src/integrators.jl +++ b/src/integrators.jl @@ -247,7 +247,7 @@ function __step!(integrator) # apply callbacks discrete_callbacks = integrator.callback.discrete_callbacks for (ncb, callback) in enumerate(discrete_callbacks) - if callback.condition(integrator.u, integrator.t, integrator) + if callback.condition(integrator.u, integrator.t, integrator)::Bool NVTX.@range "Callback $ncb of $(length(discrete_callbacks))" color = colorant"yellow" begin callback.affect!(integrator) end