--- /dev/null
+module Examples
+where
+
+-- | Values of the function f(x,y,z) = 1 + x + xy + xyz taken at nine
+-- points (hi, hj, jk) with h = 1. From example one in the paper.
+-- Used in the next bunch of tests.
+trilinear :: [[[Double]]]
+trilinear = [ [ [ 1, 2, 3 ],
+ [ 1, 3, 5 ],
+ [ 1, 4, 7 ] ],
+ [ [ 1, 2, 3 ],
+ [ 1, 4, 7 ],
+ [ 1, 6, 11 ] ],
+ [ [ 1, 2, 3 ],
+ [ 1, 5, 9 ],
+ [ 1, 8, 15 ]]]
+
+
+-- | A 3x3x3 array of zeros.
+zeros :: [[[Double]]]
+zeros = [ [ [ 0, 0, 0 ],
+ [ 0, 0, 0 ],
+ [ 0, 0, 0 ] ],
+
+ [ [ 0, 0, 0 ],
+ [ 0, 0, 0 ],
+ [ 0, 0, 0 ] ],
+
+ [ [ 0, 0, 0 ],
+ [ 0, 0, 0 ],
+ [ 0, 0, 0 ]]]
+
+
+-- | A 3x3x3 array of numbers, starting at (0,0,0) == 0 and counting
+-- up to (2,2,2) == 26 in x,y,z order.
+naturals :: [[[Double]]]
+naturals = [ [ [ 0, 1, 2 ],
+ [ 3, 4, 5 ],
+ [ 6, 7, 8 ] ],
+
+ [ [ 9, 10, 11 ],
+ [ 12, 13, 14 ],
+ [ 15, 16, 17 ] ],
+
+ [ [ 18, 19, 20 ],
+ [ 21, 22, 23 ],
+ [ 24, 25, 26 ]]]
--import Tetrahedron
--import ThreeDimensional
-trilinear :: [[[Double]]]
-trilinear = [ [ [ 1, 2, 3 ],
- [ 1, 3, 5 ],
- [ 1, 4, 7 ] ],
- [ [ 1, 2, 3 ],
- [ 1, 4, 7 ],
- [ 1, 6, 11 ] ],
- [ [ 1, 2, 3 ],
- [ 1, 5, 9 ],
- [ 1, 8, 15 ]]]
-
-zeros :: [[[Double]]]
-zeros = [ [ [ 0, 0, 0 ],
- [ 0, 0, 0 ],
- [ 0, 0, 0 ] ],
- --
- [ [ 0, 0, 0 ],
- [ 0, 0, 0 ],
- [ 0, 0, 0 ] ],
- --
- [ [ 0, 0, 0 ],
- [ 0, 0, 0 ],
- [ 0, 0, 0 ]]]
-
-dummy :: [[[Double]]]
-dummy = [ [ [ 0, 1, 2 ],
- [ 3, 4, 5 ],
- [ 6, 7, 8 ] ],
- --
- [ [ 9, 10, 11 ],
- [ 12, 13, 14 ],
- [ 15, 16, 17 ] ],
- --
- [ [ 18, 19, 20 ],
- [ 21, 22, 23 ],
- [ 24, 25, 26 ]]]
--find_point_value :: RealFunction Point
import Assertions
import Cube
+import Examples
import Grid
import Tetrahedron
return (make_grid h' fvs)
--- | Values of the function f(x,y,z) = 1 + x + xy + xyz taken at nine
--- points (hi, hj, jk) with h = 1. From example one in the paper.
--- Used in the next bunch of tests.
-trilinear :: [[[Double]]]
-trilinear = [ [ [ 1, 2, 3 ],
- [ 1, 3, 5 ],
- [ 1, 4, 7 ] ],
- [ [ 1, 2, 3 ],
- [ 1, 4, 7 ],
- [ 1, 6, 11 ] ],
- [ [ 1, 2, 3 ],
- [ 1, 5, 9 ],
- [ 1, 8, 15 ]]]
-
-- | Check the value of c0030 for tetrahedron0 belonging to the
-- cube centered on (1,1,1) with a grid constructed from the
-- trilinear values. See example one in the paper.