| | 1 | = Laplace = |
| | 2 | |
| | 3 | Solves the Laplace equation `u_xx + u_yy = 0` in a rectangular domain, by iteratively applying a stencil function function. |
| | 4 | |
| | 5 | The first argument is the number of iterations to use. The second is a BMP file containing boundary conditions. |
| | 6 | |
| | 7 | {{{ |
| | 8 | repa-laplace 10000 pls-400x400.bmp pls-400x400-out.bmp |
| | 9 | }}} |
| | 10 | |
| | 11 | == Code == |
| | 12 | |
| | 13 | The main algorithm is at http://code.haskell.org/repa/repa-stable/repa-examples/Laplace/src/Solver.hs |
| | 14 | |
| | 15 | The wrapper is at http://code.haskell.org/repa/repa-stable/repa-examples/Laplace/src/Main.hs |
| | 16 | |
| | 17 | == Test Data == |
| | 18 | |
| | 19 | || pls-400x400.bmp || pls-400x400-out.bmp || |