#include <linear_tet_map.hpp>
Public Member Functions | |
Linear_tet_map () | |
Linear_tet_map (const Self &f) | |
template<typename Moab , typename Points , typename Point > | |
std::pair< bool, Point > | operator() (const Moab &moab, const Entity_handle _eh, const Points &v, const Point &p, const double tol=1e-6) |
Private Types | |
typedef Linear_tet_map< Entity_handle, Matrix > | Self |
Private Member Functions | |
template<typename Point > | |
bool | is_contained (const Point &result, const double tol=1e-6) |
template<typename Point , typename Field > | |
double | evaluate_scalar_field (const Point &p, const Field &field_values) const |
template<typename Points , typename Field > | |
double | integrate_scalar_field (const Points &v, const Field &field_values) const |
template<typename Points > | |
void | set_tet (const Entity_handle _eh, const Points &v) |
Private Attributes | |
Matrix | Tinv |
Entity_handle | eh |
Definition at line 12 of file linear_tet_map.hpp.
|
private |
Definition at line 15 of file linear_tet_map.hpp.
|
inline |
Definition at line 19 of file linear_tet_map.hpp.
19 : Tinv(), eh() {}
|
inline |
Definition at line 21 of file linear_tet_map.hpp.
21 : Tinv( f.Tinv ), eh( f.eh ) {}
|
inlineprivate |
Definition at line 57 of file linear_tet_map.hpp.
58 {
59 double f0 = field_values[0];
60 double f = f0;
61 for( std::size_t i = 1; i < 5; ++i )
62 {
63 f += ( field_values[i] - f0 ) * p[i - 1];
64 }
65 return f;
66 }
|
inlineprivate |
Definition at line 68 of file linear_tet_map.hpp.
69 {
70 double I( 0.0 );
71 for( unsigned int i = 0; i < 4; ++i )
72 {
73 I += field_values[i];
74 }
75 double det =
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] )
78 .determinant();
79 I *= det / 24.0;
80 return I;
81 }
|
inlineprivate |
Definition at line 43 of file linear_tet_map.hpp.
44 {
45 double sum = 0.0;
46 for( std::size_t i = 0; i < 3; ++i )
47 {
48 sum += result[i];
49 if( result[i] < -tol )
50 {
51 return false;
52 }
53 }
54 return sum < 1.0 + tol;
55 }
References moab::sum().
Referenced by moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::operator()().
|
inline |
Definition at line 24 of file linear_tet_map.hpp.
29 {
30 // Remove the warning about unused parameter
31 if( NULL != &moab )
32 {
33 }
34
35 set_tet( _eh, v );
36 // TODO: Make sure this is correct
37 Point result = Tinv * p;
38 return std::make_pair( is_contained( result, tol ), result );
39 }
References moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::is_contained(), moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::set_tet(), and moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::Tinv.
|
inlineprivate |
Definition at line 84 of file linear_tet_map.hpp.
85 { 86 if( eh != _eh ) 87 { 88 eh = _eh; 89 Tinv = moab::Matrix::inverse( Matrix( v[1][0] - v[0][0], v[2][0] - v[0][0], v[3][0] - v[0][0], 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] ) ); 92 } 93 }
References moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::eh, moab::Matrix::inverse(), and moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::Tinv.
Referenced by moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::operator()().
|
private |
Definition at line 97 of file linear_tet_map.hpp.
Referenced by moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::set_tet().
|
private |
Definition at line 96 of file linear_tet_map.hpp.
Referenced by moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::operator()(), and moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::set_tet().