From f7ae11c8f0219c106bf508e77f0e1c0222b15349 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Fri, 7 Jun 2024 13:26:52 -0400 Subject: [PATCH] make default unstable_check just return false --- src/common_defaults.jl | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/common_defaults.jl b/src/common_defaults.jl index e173f9a5b..02680014d 100644 --- a/src/common_defaults.jl +++ b/src/common_defaults.jl @@ -106,20 +106,7 @@ function NAN_CHECK(x::SparseArrays.AbstractSparseMatrixCSC) any(NAN_CHECK, SparseArrays.nonzeros(x)) end -INFINITE_OR_GIANT(x::Number) = !isfinite(x) -function INFINITE_OR_GIANT(x::Union{ - AbstractArray, RecursiveArrayTools.AbstractVectorOfArray}) - any( - INFINITE_OR_GIANT, x) -end -INFINITE_OR_GIANT(x::RecursiveArrayTools.ArrayPartition) = any(INFINITE_OR_GIANT, x.x) -function INFINITE_OR_GIANT(x::SparseArrays.AbstractSparseMatrixCSC) - any(INFINITE_OR_GIANT, SparseArrays.nonzeros(x)) -end ODE_DEFAULT_UNSTABLE_CHECK(dt, u, p, t) = false -function ODE_DEFAULT_UNSTABLE_CHECK(dt, u::Union{Number, AbstractArray{<:Number}}, p, t) - INFINITE_OR_GIANT(u) -end # Nonlinear Solve Norm (norm(_, 2)) NONLINEARSOLVE_DEFAULT_NORM(u::Union{AbstractFloat, Complex}) = @fastmath abs(u)