Skip to content

Commit

Permalink
feat: simplify initialization system with fully_determined=nothing
Browse files Browse the repository at this point in the history
…by default
  • Loading branch information
AayushSabharwal committed Nov 25, 2024
1 parent d4b9b46 commit 61b53ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/systems/diffeqs/abstractodesystem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem,
check_length = true,
warn_initialize_determined = true,
initialization_eqs = [],
fully_determined = false,
fully_determined = nothing,
check_units = true,
kwargs...) where {iip, specialize}
if !iscomplete(sys)
Expand All @@ -1313,6 +1313,10 @@ function InitializationProblem{iip, specialize}(sys::AbstractODESystem,
sys; u0map, initialization_eqs, check_units, pmap = parammap); fully_determined)
end

if !isempty(StructuralTransformations.singular_check(get_tearing_state(isys)))
@warn "Since the initialization system is singular, the guess values may significantly affect the initial values of the ODE"
end

uninit = setdiff(unknowns(sys), [unknowns(isys); getfield.(observed(isys), :lhs)])

# TODO: throw on uninitialized arrays
Expand Down
2 changes: 1 addition & 1 deletion src/systems/problem_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ function process_SciMLProblem(
constructor, sys::AbstractSystem, u0map, pmap; build_initializeprob = true,
implicit_dae = false, t = nothing, guesses = AnyDict(),
warn_initialize_determined = true, initialization_eqs = [],
eval_expression = false, eval_module = @__MODULE__, fully_determined = false,
eval_expression = false, eval_module = @__MODULE__, fully_determined = nothing,
check_initialization_units = false, tofloat = true, use_union = false,
u0_constructor = identity, du0map = nothing, check_length = true,
symbolic_u0 = false, warn_cyclic_dependency = false,
Expand Down

0 comments on commit 61b53ec

Please sign in to comment.