-cube_at g i j k
- | i < 0 = error "i < 0 in cube_at"
- | i >= xsize = error "i >= xsize in cube_at"
- | j < 0 = error "j < 0 in cube_at"
- | j >= ysize = error "j >= ysize in cube_at"
- | k < 0 = error "k < 0 in cube_at"
- | k >= zsize = error "k >= zsize in cube_at"
- | otherwise = Cube delta i j k fvs' tet_vol
- where
- fvs = function_values g
- (xsize, ysize, zsize) = dims fvs
- fvs' = make_values fvs i j k
- delta = h g
- tet_vol = (1/24)*(delta^(3::Int))
-
--- The first cube along any axis covers (-h/2, h/2). The second
--- covers (h/2, 3h/2). The third, (3h/2, 5h/2), and so on.
+cube_at !g !i !j !k =
+ Cube i j k fvs' tet_vol
+ where
+ fvs = function_values g
+ fvs' = make_values fvs i j k
+ tet_vol = 1/24
+
+
+-- The first cube along any axis covers (-1/2, 1/2). The second
+-- covers (1/2, 3/2). The third, (3/2, 5/2), and so on.