summaryrefslogtreecommitdiff
path: root/packages/tests/src
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2012-03-13 15:22:30 +0100
committerAlberto Ruiz <aruiz@um.es>2012-03-13 15:22:30 +0100
commitc5fcca336f7d1ad6235d411268d8ff946bbe7f0c (patch)
tree0eb0b76d0e59b75e208d80a68f1641513b00f430 /packages/tests/src
parent7f12c1f3be9d53cb1290bfdaabf2fed296f47128 (diff)
update ode test and bump versions
Diffstat (limited to 'packages/tests/src')
-rw-r--r--packages/tests/src/Numeric/LinearAlgebra/Tests.hs13
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
172odeTest = utest "ode" (last (toLists sol) ~~ [-1.7588880332411019, 8.364348908711941e-2]) 172odeTest = 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