diff options
author | Dominic Steinitz <dominic@steinitz.org> | 2018-04-06 09:11:55 +0100 |
---|---|---|
committer | Dominic Steinitz <dominic@steinitz.org> | 2018-04-06 09:11:55 +0100 |
commit | ad4eb127ba8d71d88f1dc5a4de072c66a36ce3a7 (patch) | |
tree | 3bb468edca8e4fa31bd4b05b9786e9a19d44ec67 /packages/sundials/src/Main.hs | |
parent | 59a0413a83a9bcee93e3f0761cae6fdda2a98933 (diff) |
Translating via lists
Diffstat (limited to 'packages/sundials/src/Main.hs')
-rw-r--r-- | packages/sundials/src/Main.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/sundials/src/Main.hs b/packages/sundials/src/Main.hs index b950036..9978aa5 100644 --- a/packages/sundials/src/Main.hs +++ b/packages/sundials/src/Main.hs | |||
@@ -127,15 +127,15 @@ main = do | |||
127 | -- putStrLn $ show res | 127 | -- putStrLn $ show res |
128 | -- putStrLn $ butcherTableauTex res | 128 | -- putStrLn $ butcherTableauTex res |
129 | 129 | ||
130 | let res1 = odeSolve' (SDIRK_5_3_4 brussJac) brusselator [1.2, 3.1, 3.0] (fromList [0.0, 0.1 .. 100.0]) | 130 | let res1 = odeSolve' (SDIRK_5_3_4 brussJac) brusselator [1.2, 3.1, 3.0] (fromList [0.0, 0.1 .. 10.0]) |
131 | renderRasterific "diagrams/brusselator.png" | 131 | renderRasterific "diagrams/brusselator.png" |
132 | (D.dims2D 500.0 500.0) | 132 | (D.dims2D 500.0 500.0) |
133 | (renderAxis $ lSaxis $ [0.0, 0.1 .. 100.0]:(toLists $ tr res1)) | 133 | (renderAxis $ lSaxis $ [0.0, 0.1 .. 10.0]:(toLists $ tr res1)) |
134 | 134 | ||
135 | let res1a = odeSolve' (SDIRK_5_3_4') brusselator [1.2, 3.1, 3.0] (fromList [0.0, 0.1 .. 100.0]) | 135 | let res1a = odeSolve' (SDIRK_5_3_4') brusselator [1.2, 3.1, 3.0] (fromList [0.0, 0.1 .. 10.0]) |
136 | renderRasterific "diagrams/brusselatorA.png" | 136 | renderRasterific "diagrams/brusselatorA.png" |
137 | (D.dims2D 500.0 500.0) | 137 | (D.dims2D 500.0 500.0) |
138 | (renderAxis $ lSaxis $ [0.0, 0.1 .. 100.0]:(toLists $ tr res1a)) | 138 | (renderAxis $ lSaxis $ [0.0, 0.1 .. 10.0]:(toLists $ tr res1a)) |
139 | 139 | ||
140 | let res2 = odeSolve' (SDIRK_5_3_4 stiffJac) stiffish [0.0] (fromList [0.0, 0.1 .. 10.0]) | 140 | let res2 = odeSolve' (SDIRK_5_3_4 stiffJac) stiffish [0.0] (fromList [0.0, 0.1 .. 10.0]) |
141 | putStrLn $ show res2 | 141 | putStrLn $ show res2 |
@@ -143,17 +143,17 @@ main = do | |||
143 | (D.dims2D 500.0 500.0) | 143 | (D.dims2D 500.0 500.0) |
144 | (renderAxis $ kSaxis $ zip [0.0, 0.1 .. 10.0] (concat $ toLists res2)) | 144 | (renderAxis $ kSaxis $ zip [0.0, 0.1 .. 10.0] (concat $ toLists res2)) |
145 | 145 | ||
146 | let res3 = odeSolve' (SDIRK_5_3_4 lorenzJac) lorenz [-5.0, -5.0, 1.0] (fromList [0.0, 0.01 .. 1000.0]) | 146 | let res3 = odeSolve' (SDIRK_5_3_4 lorenzJac) lorenz [-5.0, -5.0, 1.0] (fromList [0.0, 0.01 .. 10.0]) |
147 | putStrLn $ show $ last ((toLists $ tr res3)!!0) | 147 | putStrLn $ show $ last ((toLists $ tr res3)!!0) |
148 | 148 | ||
149 | let res3 = odeSolve' (SDIRK_5_3_4') lorenz [-5.0, -5.0, 1.0] (fromList [0.0, 0.01 .. 1000.0]) | 149 | let res3 = odeSolve' (SDIRK_5_3_4') lorenz [-5.0, -5.0, 1.0] (fromList [0.0, 0.01 .. 10.0]) |
150 | putStrLn $ show $ last ((toLists $ tr res3)!!0) | 150 | putStrLn $ show $ last ((toLists $ tr res3)!!0) |
151 | 151 | ||
152 | renderRasterific "diagrams/lorenz.png" | 152 | renderRasterific "diagrams/lorenz.png" |
153 | (D.dims2D 500.0 500.0) | 153 | (D.dims2D 500.0 500.0) |
154 | (renderAxis $ kSaxis $ zip ((toLists $ tr res3)!!0) ((toLists $ tr res3)!!1)) | 154 | (renderAxis $ kSaxis $ zip ((toLists $ tr res3)!!0) ((toLists $ tr res3)!!1)) |
155 | 155 | ||
156 | let res3a = odeSolve' (SDIRK_5_3_4') lorenz [-5.0, -5.0, 1.0] (fromList [0.0, 0.01 .. 30.0]) | 156 | let res3a = odeSolve' (SDIRK_5_3_4') lorenz [-5.0, -5.0, 1.0] (fromList [0.0, 0.01 .. 10.0]) |
157 | renderRasterific "diagrams/lorenzA.png" | 157 | renderRasterific "diagrams/lorenzA.png" |
158 | (D.dims2D 500.0 500.0) | 158 | (D.dims2D 500.0 500.0) |
159 | (renderAxis $ kSaxis $ zip ((toLists $ tr res3)!!0) ((toLists $ tr res3a)!!1)) | 159 | (renderAxis $ kSaxis $ zip ((toLists $ tr res3)!!0) ((toLists $ tr res3a)!!1)) |