From 1b22927d853ed87283f76f1cc8a49147ae2c4d24 Mon Sep 17 00:00:00 2001 From: Herman Sletmoen Date: Sat, 20 Jul 2024 12:33:29 +0200 Subject: [PATCH] Format --- docs/src/tutorials/initialization.md | 4 ++-- src/utils.jl | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/src/tutorials/initialization.md b/docs/src/tutorials/initialization.md index 8852fc7ac0..f40c28991f 100644 --- a/docs/src/tutorials/initialization.md +++ b/docs/src/tutorials/initialization.md @@ -195,7 +195,7 @@ long enough you will see that `λ = 0` is required for this equation, but since `λ = 1` we end up with a set of equations that are impossible to satisfy. !!! note - + If you would prefer to have an error instead of a warning in the context of non-fully determined systems, pass the keyword argument `fully_determined = true` into the problem constructor. Additionally, any warning about not being fully determined can @@ -278,7 +278,7 @@ sol = solve(iprob) ``` !!! note - + For more information on solving NonlinearProblems and NonlinearLeastSquaresProblems, check out the [NonlinearSolve.jl tutorials!](https://docs.sciml.ai/NonlinearSolve/stable/tutorials/getting_started/). diff --git a/src/utils.jl b/src/utils.jl index 9e6abafc4d..86a28dcae6 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -665,7 +665,8 @@ function promote_to_concrete(vs; tofloat = true, use_union = true) T = eltype(vs) # return early if there is nothing to do - Base.isconcretetype(T) && (!tofloat#= || T === float(T)=#) && return vs # TODO: disabled float(T) to restore missing errors in https://github.com/SciML/ModelingToolkit.jl/issues/2873 + #Base.isconcretetype(T) && (!tofloat || T === float(T)) && return vs # TODO: disabled float(T) to restore missing errors in https://github.com/SciML/ModelingToolkit.jl/issues/2873 + Base.isconcretetype(T) && !tofloat && return vs sym_vs = filter(x -> SymbolicUtils.issym(x) || SymbolicUtils.iscall(x), vs) isempty(sym_vs) || throw_missingvars_in_sys(sym_vs)