Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
SimpleNonlinearSolve = "727e6d20-b764-4bd8-a329-72de5adea6c7"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
StaticArrayInterface = "0d7ed370-da01-4f52-bd93-41d350b8b718"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77"

Expand Down Expand Up @@ -119,7 +117,7 @@ DocStringExtensions = "0.9.5"
EnumX = "1.0.5"
ExplicitImports = "1.13.1"
ExponentialUtilities = "1.27"
FastBroadcast = "0.3.5"
FastBroadcast = "1.2"
FastClosures = "0.3.2"
FillArrays = "1.13"
FiniteDiff = "2.27"
Expand Down Expand Up @@ -170,14 +168,12 @@ Polyester = "0.7.18"
PreallocationTools = "0.4.31, 1"
PrecompileTools = "1.2.1"
Preferences = "1.4.3"
RecursiveArrayTools = "3.36"
RecursiveArrayTools = "3.51"
Reexport = "1.2.2"
SciMLBase = "2.143"
SciMLOperators = "1.8"
SciMLStructures = "1.7"
SimpleNonlinearSolve = "2.7"
Static = "1.2"
StaticArrayInterface = "1.8"
StaticArrays = "1.9.14"
StableRNGs = "1"
StructArrays = "0.6, 0.7"
Expand Down
4 changes: 2 additions & 2 deletions lib/DelayDiffEq/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ DiffEqCallbacks = "4"
DiffEqDevTools = "2.44.4"
DiffEqNoiseProcess = "5"
ExplicitImports = "1.13.1"
FastBroadcast = "0.3.5"
FastBroadcast = "1.2"
FiniteDiff = "2.27"
ForwardDiff = "0.10.38, 1"
LinearAlgebra = "1"
Expand All @@ -88,7 +88,7 @@ OrdinaryDiffEqSSPRK = "1.5.0"
OrdinaryDiffEqTsit5 = "1.4.0"
OrdinaryDiffEqVerner = "1.5.0"
Random = "<0.0.1, 1"
RecursiveArrayTools = "3"
RecursiveArrayTools = "3.51"
Reexport = "1.0"
SafeTestsets = "0.1.0"
SciMLBase = "2.115.0"
Expand Down
6 changes: 2 additions & 4 deletions lib/DiffEqBase/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ SciMLBase = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
SciMLOperators = "c0aeaf25-5076-4817-a8d5-81caf7dfa961"
SciMLStructures = "53ae85a6-f571-4167-b2af-e1d143709226"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
TruncatedStacktraces = "781d530d-4396-4725-bb49-402e4bee1e77"
Expand Down Expand Up @@ -81,7 +80,7 @@ Distributions = "0.25"
DynamicQuantities = "1"
DocStringExtensions = "0.9"
Enzyme = "0.13.100"
FastBroadcast = "0.3.5"
FastBroadcast = "1.2"
FastClosures = "0.3.2"
FastPower = "1.1"
FlexUnits = "0.4"
Expand All @@ -104,7 +103,7 @@ Pkg = "1.9"
PrecompileTools = "1"
Printf = "1.9"
Random = "1.9"
RecursiveArrayTools = "3.1"
RecursiveArrayTools = "3.51"
Reexport = "1.0"
ReverseDiff = "1"
SafeTestsets = "0.1"
Expand All @@ -113,7 +112,6 @@ SciMLOperators = "1"
SciMLStructures = "1.5"
Setfield = "1"
SparseArrays = "1.9"
Static = "1"
StaticArrays = "1"
StaticArraysCore = "1.4"
SymbolicIndexingInterface = "0.3.39"
Expand Down
2 changes: 1 addition & 1 deletion lib/DiffEqBase/ext/DiffEqBaseForwardDiffExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ using DiffEqBase, ForwardDiff
using DiffEqBase.ArrayInterface
using DiffEqBase: Void, FunctionWrappersWrappers, OrdinaryDiffEqTag,
AbstractTimeseriesSolution,
RecursiveArrayTools, reduce_tup, _promote_tspan, has_continuous_callback
RecursiveArrayTools, _promote_tspan, has_continuous_callback
import DiffEqBase: hasdualpromote, wrapfun_oop, wrapfun_iip, prob2dtmin,
promote_tspan, ODE_DEFAULT_NORM
import SciMLBase: isdualtype, DualEltypeChecker, sse, __sum
Expand Down
3 changes: 1 addition & 2 deletions lib/DiffEqBase/src/DiffEqBase.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ using FunctionWrappers: FunctionWrapper
using MuladdMacro


using FastBroadcast: @.., True, False
using FastBroadcast: @.., Serial, Threaded

using Static: reduce_tup

import RecursiveArrayTools
import TruncatedStacktraces
Expand Down
26 changes: 13 additions & 13 deletions lib/DiffEqBase/src/calculate_residuals.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ end
# Inplace Versions

"""
DiffEqBase.calculate_residuals!(out, ũ, u₀, u₁, α, ρ, thread=False())
DiffEqBase.calculate_residuals!(out, ũ, u₀, u₁, α, ρ, thread=Serial())

Save element-wise residuals
```math
Expand All @@ -99,13 +99,13 @@ Save element-wise residuals
in `out`.

The argument `thread` determines whether internal broadcasting on
appropriate CPU arrays should be serial (`thread = False()`, default)
or use multiple threads (`thread = True()`) when Julia is started
appropriate CPU arrays should be serial (`thread = Serial()`, default)
or use multiple threads (`thread = Threaded()`) when Julia is started
with multiple threads.
"""
@inline function calculate_residuals!(
out, ũ, u₀, u₁, α, ρ, internalnorm, t,
thread::Union{False, True} = False()
thread::Union{Serial, Threaded, Bool} = Serial()
)
@.. broadcast = false thread = thread out = calculate_residuals(
ũ, u₀, u₁, α, ρ, internalnorm,
Expand All @@ -116,7 +116,7 @@ end

@inline function calculate_residuals!(
out::Array, ũ::Array, u₀::Array, u₁::Array, α::Number,
ρ::Number, internalnorm::F, t, ::False
ρ::Number, internalnorm::F, t, ::Serial
) where {F}
@inbounds @simd ivdep for i in eachindex(out, ũ, u₀, u₁)
out[i] = calculate_residuals(ũ[i], u₀[i], u₁[i], α, ρ, internalnorm, t)
Expand All @@ -125,7 +125,7 @@ end
end

"""
calculate_residuals!(out, u₀, u₁, α, ρ, thread=False())
calculate_residuals!(out, u₀, u₁, α, ρ, thread=Serial())

Save element-wise residuals
```math
Expand All @@ -134,34 +134,34 @@ Save element-wise residuals
in `out`.

The argument `thread` determines whether internal broadcasting on
appropriate CPU arrays should be serial (`thread = False()`, default)
or use multiple threads (`thread = True()`) when Julia is started
appropriate CPU arrays should be serial (`thread = Serial()`, default)
or use multiple threads (`thread = Threaded()`) when Julia is started
with multiple threads.
"""
@inline function calculate_residuals!(
out, u₀, u₁, α, ρ, internalnorm, t,
thread::Union{False, True} = False()
thread::Union{Serial, Threaded, Bool} = Serial()
)
@.. broadcast = false thread = thread out = calculate_residuals(u₀, u₁, α, ρ, internalnorm, t)
return nothing
end

"""
calculate_residuals!(out, E₁, E₂, u₀, u₁, α, ρ, δ, scalarnorm, thread=False())
calculate_residuals!(out, E₁, E₂, u₀, u₁, α, ρ, δ, scalarnorm, thread=Serial())

Calculate element-wise residuals
```math
\\frac{δ E₁ + E₂}{α+\\max{scalarnorm(u₀),scalarnorm(u₁)}*ρ}.
```

The argument `thread` determines whether internal broadcasting on
appropriate CPU arrays should be serial (`thread = False()`, default)
or use multiple threads (`thread = True()`) when Julia is started
appropriate CPU arrays should be serial (`thread = Serial()`, default)
or use multiple threads (`thread = Threaded()`) when Julia is started
with multiple threads.
"""
@inline function calculate_residuals!(
out, E₁, E₂, u₀, u₁, α, ρ, δ, scalarnorm, t,
thread::Union{False, True} = False()
thread::Union{Serial, Threaded, Bool} = Serial()
)
@.. broadcast = false thread = thread out = calculate_residuals(
E₁, E₂, u₀, u₁, α, ρ, δ,
Expand Down
6 changes: 2 additions & 4 deletions lib/OrdinaryDiffEqAdamsBashforthMoulton/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ version = "1.10.0"
[deps]
MuladdMacro = "46d2c3a1-f734-5fdb-9937-b9b9aeba4221"
Polyester = "f517fe37-dbe3-4b94-8317-1923a5111588"
Static = "aedffcd0-7271-4cad-89d0-dc628f76c6d3"
FastBroadcast = "7034ab61-46d4-4ed7-9d0f-46aef9175898"
OrdinaryDiffEqLowOrderRK = "1344f307-1e59-4825-a18e-ace9aa3fa4c6"
RecursiveArrayTools = "731186ca-8d62-57ce-b412-fbd966d074cd"
Expand All @@ -32,19 +31,18 @@ DiffEqBase = {path = "../DiffEqBase"}
[compat]
Pkg = "1"
Test = "<0.0.1, 1"
FastBroadcast = "0.3"
FastBroadcast = "1.2"
Random = "<0.0.1, 1"
DiffEqDevTools = "2.44.4"
MuladdMacro = "0.2"
Polyester = "0.7"
SciMLBase = "2.116"
OrdinaryDiffEqCore = "3"
Static = "1.2"
OrdinaryDiffEqLowOrderRK = "1.5.0"
Aqua = "0.8.11"
julia = "1.10"
JET = "0.9, 0.11"
RecursiveArrayTools = "3.36"
RecursiveArrayTools = "3.51"
ODEProblemLibrary = "1"
AllocCheck = "0.2"
DiffEqBase = "6.194"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import OrdinaryDiffEqCore: OrdinaryDiffEqMutableCache, OrdinaryDiffEqConstantCac
import OrdinaryDiffEqLowOrderRK: BS3ConstantCache, BS3Cache, RK4ConstantCache, RK4Cache
import RecursiveArrayTools: recursivefill!
using MuladdMacro, FastBroadcast
import Static: False
using FastBroadcast: Serial
import OrdinaryDiffEqCore

using Reexport
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ function alg_cache(
btmp = zero(u)
bs3cache = BS3Cache(
u, uprev, bk1, bk2, bk3, bk4, butilde, btmp, batmp, tab,
trivial_limiter!, trivial_limiter!, False()
trivial_limiter!, trivial_limiter!, Serial()
)
fsalfirst = zero(rate_prototype)
k4 = zero(rate_prototype)
Expand Down Expand Up @@ -527,7 +527,7 @@ function alg_cache(
recursivefill!(ratmp, false)
rk4cache = RK4Cache(
u, uprev, rk1, rk2, rk3, rk4, rk, rtmp, ratmp, trivial_limiter!,
trivial_limiter!, False()
trivial_limiter!, Serial()
)
fsalfirst = zero(rate_prototype)
k4 = zero(rate_prototype)
Expand Down Expand Up @@ -636,7 +636,7 @@ function alg_cache(
recursivefill!(ratmp, false)
rk4cache = RK4Cache(
u, uprev, rk1, rk2, rk3, rk4, rk, rtmp, ratmp, trivial_limiter!,
trivial_limiter!, False()
trivial_limiter!, Serial()
)
fsalfirst = zero(rate_prototype)
k4 = zero(rate_prototype)
Expand Down Expand Up @@ -750,7 +750,7 @@ function alg_cache(
btmp = zero(u)
bs3cache = BS3Cache(
u, uprev, bk1, bk2, bk3, bk4, butilde, btmp, batmp, tab,
trivial_limiter!, trivial_limiter!, False()
trivial_limiter!, trivial_limiter!, Serial()
)
fsalfirst = zero(rate_prototype)
k4 = zero(rate_prototype)
Expand Down Expand Up @@ -869,7 +869,7 @@ function alg_cache(
recursivefill!(ratmp, false)
rk4cache = RK4Cache(
u, uprev, rk1, rk2, rk3, rk4, rk, rtmp, ratmp, trivial_limiter!,
trivial_limiter!, False()
trivial_limiter!, Serial()
)
fsalfirst = zero(rate_prototype)
k4 = zero(rate_prototype)
Expand Down Expand Up @@ -988,7 +988,7 @@ function alg_cache(
recursivefill!(ratmp, false)
rk4cache = RK4Cache(
u, uprev, rk1, rk2, rk3, rk4, rk, rtmp, ratmp, trivial_limiter!,
trivial_limiter!, False()
trivial_limiter!, Serial()
)
fsalfirst = zero(rate_prototype)
k4 = zero(rate_prototype)
Expand Down
Loading
Loading