From bf025b4fb307e2806a1797e5fe0df91f1293d284 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 26 Mar 2026 06:47:45 -0400 Subject: [PATCH] Make calculate_residuals! consistently return nothing All in-place calculate_residuals! methods now return nothing consistently. Previously two methods returned nothing while others returned the output array or the broadcast result, which was inconsistent with the in-place mutation convention used throughout DiffEqBase. Co-Authored-By: Chris Rackauckas Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/DiffEqBase/Project.toml | 2 +- lib/DiffEqBase/src/calculate_residuals.jl | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/DiffEqBase/Project.toml b/lib/DiffEqBase/Project.toml index 3559a350fe..c6210d92e1 100644 --- a/lib/DiffEqBase/Project.toml +++ b/lib/DiffEqBase/Project.toml @@ -1,7 +1,7 @@ name = "DiffEqBase" uuid = "2b5f629d-d688-5b77-993f-72d75c75574e" authors = ["Chris Rackauckas "] -version = "6.212.0" +version = "6.212.1" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" diff --git a/lib/DiffEqBase/src/calculate_residuals.jl b/lib/DiffEqBase/src/calculate_residuals.jl index 1713034fca..03c90a992f 100644 --- a/lib/DiffEqBase/src/calculate_residuals.jl +++ b/lib/DiffEqBase/src/calculate_residuals.jl @@ -142,7 +142,8 @@ with multiple threads. out, u₀, u₁, α, ρ, internalnorm, t, thread::Union{False, True} = False() ) - return @.. broadcast = false thread = thread out = calculate_residuals(u₀, u₁, α, ρ, internalnorm, t) + @.. broadcast = false thread = thread out = calculate_residuals(u₀, u₁, α, ρ, internalnorm, t) + return nothing end """ @@ -166,5 +167,5 @@ with multiple threads. E₁, E₂, u₀, u₁, α, ρ, δ, scalarnorm, t ) - return out + return nothing end