From f695e2aeff86809f70ea8de5dd2aec658984be44 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Thu, 21 Dec 2023 14:48:46 -0500 Subject: [PATCH] Add a function to check nlls trait --- src/problems/bvp_problems.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/problems/bvp_problems.jl b/src/problems/bvp_problems.jl index 4d4b7a0ff..af95a0839 100644 --- a/src/problems/bvp_problems.jl +++ b/src/problems/bvp_problems.jl @@ -176,6 +176,16 @@ struct BVProblem{uType, tType, isinplace, nlls, P, F, PT, K} <: end end +""" + isnonlinearleastsquares(prob::BVProblem) + +Returns `true` if the underlying problem is a nonlinear least squares problem. +""" +@inline function isnonlinearleastsquares(::BVProblem{uType, + tType, iip, nlls}) where {uType, tType, iip, nlls} + return nlls +end + struct FakeSolutionObject{U} u::U end