Skip to content

Commit 7627ebb

Browse files
format
1 parent 5fe46e6 commit 7627ebb

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

docs/src/tutorials/initialization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ long enough you will see that `λ = 0` is required for this equation, but since
195195
`λ = 1` we end up with a set of equations that are impossible to satisfy.
196196

197197
!!! note
198-
198+
199199
If you would prefer to have an error instead of a warning in the context of non-fully
200200
determined systems, pass the keyword argument `fully_determined = true` into the
201201
problem constructor. Additionally, any warning about not being fully determined can
@@ -278,7 +278,7 @@ sol = solve(iprob)
278278
```
279279

280280
!!! note
281-
281+
282282
For more information on solving NonlinearProblems and NonlinearLeastSquaresProblems,
283283
check out the [NonlinearSolve.jl tutorials!](https://docs.sciml.ai/NonlinearSolve/stable/tutorials/getting_started/).
284284

test/initializationsystem.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ sol = solve(initprob)
1717
@test SciMLBase.successful_retcode(sol)
1818
@test maximum(abs.(sol[conditions])) < 1e-14
1919

20-
@test_throws ModelingToolkit.ExtraVariablesSystemException ModelingToolkit.InitializationProblem(pend, 0.0, [], [g => 1];
20+
@test_throws ModelingToolkit.ExtraVariablesSystemException ModelingToolkit.InitializationProblem(
21+
pend, 0.0, [], [g => 1];
2122
guesses = [ModelingToolkit.missing_variable_defaults(pend); x => 1; y => 0.2],
2223
fully_determined = true)
2324

@@ -55,7 +56,8 @@ sol = solve(prob.f.initializeprob)
5556
sol = solve(prob, Rodas5P())
5657
@test maximum(abs.(sol[conditions][1])) < 1e-14
5758

58-
@test_throws ModelingToolkit.ExtraVariablesSystemException ODEProblem(pend, [x => 1], (0.0, 1.5), [g => 1],
59+
@test_throws ModelingToolkit.ExtraVariablesSystemException ODEProblem(
60+
pend, [x => 1], (0.0, 1.5), [g => 1],
5961
guesses = ModelingToolkit.missing_variable_defaults(pend),
6062
fully_determined = true)
6163

@@ -237,7 +239,8 @@ initsol = solve(initprob, reltol = 1e-12, abstol = 1e-12)
237239
@test SciMLBase.successful_retcode(initsol)
238240
@test maximum(abs.(initsol[conditions])) < 1e-14
239241

240-
@test_throws ModelingToolkit.ExtraEquationsSystemException ModelingToolkit.InitializationProblem(sys, 0.0, fully_determined = true)
242+
@test_throws ModelingToolkit.ExtraEquationsSystemException ModelingToolkit.InitializationProblem(
243+
sys, 0.0, fully_determined = true)
241244

242245
allinit = unknowns(sys) .=> initsol[unknowns(sys)]
243246
prob = ODEProblem(sys, allinit, (0, 0.1))
@@ -249,7 +252,8 @@ sol = solve(prob, Rodas5P(), initializealg = BrownFullBasicInit())
249252
prob = ODEProblem(sys, allinit, (0, 0.1))
250253
prob = ODEProblem(sys, [], (0, 0.1), check = false)
251254

252-
@test_throws ModelingToolkit.ExtraEquationsSystemException ODEProblem(sys, [], (0, 0.1), fully_determined = true)
255+
@test_throws ModelingToolkit.ExtraEquationsSystemException ODEProblem(
256+
sys, [], (0, 0.1), fully_determined = true)
253257

254258
sol = solve(prob, Rodas5P())
255259
# If initialized incorrectly, then it would be InitialFailure

0 commit comments

Comments
 (0)