diff options
Diffstat (limited to 'packages/tests/src')
-rw-r--r-- | packages/tests/src/Numeric/LinearAlgebra/Tests.hs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs index 7c41209..fd66767 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs | |||
@@ -169,11 +169,14 @@ rootFindingTest = TestList [ utest "root Hybrids" (fst sol1 ~~ [1,1]) | |||
169 | 169 | ||
170 | --------------------------------------------------------------------- | 170 | --------------------------------------------------------------------- |
171 | 171 | ||
172 | odeTest = utest "ode" (last (toLists sol) ~~ [-1.7588880332411019, 8.364348908711941e-2]) | 172 | odeTest = utest "ode" (last (toLists sol) ~~ newsol) |
173 | where sol = odeSolveV RK8pd 1E-6 1E-6 0 (l2v $ vanderpol 10) Nothing (fromList [1,0]) ts | 173 | where |
174 | ts = linspace 101 (0,100) | 174 | sol = odeSolveV RK8pd 1E-6 1E-6 0 (l2v $ vanderpol 10) (fromList [1,0]) ts |
175 | l2v f = \t -> fromList . f t . toList | 175 | ts = linspace 101 (0,100) |
176 | vanderpol mu _t [x,y] = [y, -x + mu * y * (1-x^2) ] | 176 | l2v f = \t -> fromList . f t . toList |
177 | vanderpol mu _t [x,y] = [y, -x + mu * y * (1-x^2) ] | ||
178 | newsol = [-1.758888036617841, 8.364349410519058e-2] | ||
179 | -- oldsol = [-1.7588880332411019, 8.364348908711941e-2] | ||
177 | 180 | ||
178 | --------------------------------------------------------------------- | 181 | --------------------------------------------------------------------- |
179 | 182 | ||