import Comparisons ((~=), nearly_ge)
import FunctionValues (FunctionValues(..), empty_values)
import Misc (factorial)
import Comparisons ((~=), nearly_ge)
import FunctionValues (FunctionValues(..), empty_values)
import Misc (factorial)
import RealFunction (RealFunction, cmult, fexp)
import ThreeDimensional (ThreeDimensional(..))
import RealFunction (RealFunction, cmult, fexp)
import ThreeDimensional (ThreeDimensional(..))
polynomial :: Tetrahedron -> (RealFunction Point)
polynomial t =
V.sum $ V.singleton ((c t 0 0 0 3) `cmult` (beta t 0 0 0 3)) `V.snoc`
polynomial :: Tetrahedron -> (RealFunction Point)
polynomial t =
V.sum $ V.singleton ((c t 0 0 0 3) `cmult` (beta t 0 0 0 3)) `V.snoc`
term1 = ((x2 - x4)*y1 - (x1 - x4)*y2 + (x1 - x2)*y4)*z3
term2 = ((x2 - x3)*y1 - (x1 - x3)*y2 + (x1 - x2)*y3)*z4
term3 = ((x3 - x4)*y2 - (x2 - x4)*y3 + (x2 - x3)*y4)*z1
term1 = ((x2 - x4)*y1 - (x1 - x4)*y2 + (x1 - x2)*y4)*z3
term2 = ((x2 - x3)*y1 - (x1 - x3)*y2 + (x1 - x2)*y3)*z4
term3 = ((x3 - x4)*y2 - (x2 - x4)*y3 + (x2 - x3)*y4)*z1
b0 :: Tetrahedron -> (RealFunction Point)
b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b0 :: Tetrahedron -> (RealFunction Point)
b0 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b1 :: Tetrahedron -> (RealFunction Point)
b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b1 :: Tetrahedron -> (RealFunction Point)
b1 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b2 :: Tetrahedron -> (RealFunction Point)
b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b2 :: Tetrahedron -> (RealFunction Point)
b2 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b3 :: Tetrahedron -> (RealFunction Point)
b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
b3 :: Tetrahedron -> (RealFunction Point)
b3 t point = (volume inner_tetrahedron) / (precomputed_volume t)
where
[ testCase "volume1" volume1,
testCase "doesn't contain point1" doesnt_contain_point1]
where
[ testCase "volume1" volume1,
testCase "doesn't contain point1" doesnt_contain_point1]
where
[ testCase "volume1" volume1,
testCase "contains point1" contains_point1]
where
[ testCase "volume1" volume1,
testCase "contains point1" contains_point1]
where
testCase "doesn't contain point4" doesnt_contain_point4,
testCase "doesn't contain point5" doesnt_contain_point5]
where
testCase "doesn't contain point4" doesnt_contain_point4,
testCase "doesn't contain point5" doesnt_contain_point5]
where