+{-# LANGUAGE BangPatterns #-}
module Tetrahedron (
Tetrahedron(..),
b0, -- Cube test
data Tetrahedron =
Tetrahedron { function_values :: FunctionValues,
- v0 :: Point,
- v1 :: Point,
- v2 :: Point,
- v3 :: Point,
- precomputed_volume :: Double
+ v0 :: !Point,
+ v1 :: !Point,
+ v2 :: !Point,
+ v3 :: !Point,
+ precomputed_volume :: !Double
}
deriving (Eq)
-- Zeilfelder, pp. 84-86. If incorrect indices are supplied, the
-- function will simply error.
c :: Tetrahedron -> Int -> Int -> Int -> Int -> Double
-c t i j k l =
+c !t !i !j !k !l =
coefficient i j k l
where
fvs = function_values t