1 #ifndef MOAB_LINEAR_TET_HPP
2 #define MOAB_LINEAR_TET_HPP
8 namespace element_utility
11 template <
typename Entity_handle,
typename Matrix >
23 template <
typename Moab,
typename Po
ints,
typename Po
int >
25 const Entity_handle _eh,
28 const double tol = 1e-6 )
37 Point result =
Tinv * p;
38 return std::make_pair(
is_contained( result, tol ), result );
42 template <
typename Po
int >
46 for( std::size_t i = 0; i < 3; ++i )
49 if( result[i] < -tol )
54 return sum < 1.0 + tol;
56 template <
typename Po
int,
typename Field >
59 double f0 = field_values[0];
61 for( std::size_t i = 1; i < 5; ++i )
63 f += ( field_values[i] - f0 ) * p[i - 1];
67 template <
typename Po
ints,
typename Field >
71 for(
unsigned int i = 0; i < 4; ++i )
76 Matrix( v[1][0] - v[0][0], v[2][0] - v[0][0], v[3][0] - v[0][0], v[1][1] - v[0][1], v[2][1] - v[0][1],
77 v[3][1] - v[0][1], v[1][2] - v[0][2], v[2][2] - v[0][2], v[3][2] - v[0][2] )
83 template <
typename Po
ints >
90 v[1][1] - v[0][1], v[2][1] - v[0][1], v[3][1] - v[0][1],
91 v[1][2] - v[0][2], v[2][2] - v[0][2], v[3][2] - v[0][2] ) );