import Comparisons ((~=))
import Cube (Cube(Cube),
find_containing_tetrahedron,
import Comparisons ((~=))
import Cube (Cube(Cube),
find_containing_tetrahedron,
tetrahedron)
import Examples (trilinear, trilinear9x9x9, zeros, naturals_1d)
import FunctionValues (make_values, value_at)
tetrahedron)
import Examples (trilinear, trilinear9x9x9, zeros, naturals_1d)
import FunctionValues (make_values, value_at)
import ScaleFactor (ScaleFactor)
import Tetrahedron (Tetrahedron, c, polynomial, v0, v1, v2, v3)
import ThreeDimensional (ThreeDimensional(..))
import ScaleFactor (ScaleFactor)
import Tetrahedron (Tetrahedron, c, polynomial, v0, v1, v2, v3)
import ThreeDimensional (ThreeDimensional(..))
-- another in each direction (x,y,z).
data Grid = Grid { h :: Double, -- MUST BE GREATER THAN ZERO!
function_values :: Values3D }
-- another in each direction (x,y,z).
data Grid = Grid { h :: Double, -- MUST BE GREATER THAN ZERO!
function_values :: Values3D }
-- Since our grid is rectangular, we can figure this out without having
-- to check every cube.
find_containing_cube :: Grid -> Point -> Cube
-- Since our grid is rectangular, we can figure this out without having
-- to check every cube.
find_containing_cube :: Grid -> Point -> Cube
i = calculate_containing_cube_coordinate g x
j = calculate_containing_cube_coordinate g y
k = calculate_containing_cube_coordinate g z
i = calculate_containing_cube_coordinate g x
j = calculate_containing_cube_coordinate g y
k = calculate_containing_cube_coordinate g z
m' = (fromIntegral m) / (fromIntegral sfx) - offset
n' = (fromIntegral n) / (fromIntegral sfy) - offset
o' = (fromIntegral o) / (fromIntegral sfz) - offset
m' = (fromIntegral m) / (fromIntegral sfx) - offset
n' = (fromIntegral n) / (fromIntegral sfy) - offset
o' = (fromIntegral o) / (fromIntegral sfz) - offset
test_trilinear_reproduced :: Assertion
test_trilinear_reproduced =
assertTrue "trilinears are reproduced correctly" $
test_trilinear_reproduced :: Assertion
test_trilinear_reproduced =
assertTrue "trilinears are reproduced correctly" $
test_trilinear9x9x9_reproduced :: Assertion
test_trilinear9x9x9_reproduced =
assertTrue "trilinear 9x9x9 is reproduced correctly" $
test_trilinear9x9x9_reproduced :: Assertion
test_trilinear9x9x9_reproduced =
assertTrue "trilinear 9x9x9 is reproduced correctly" $