moab
|
#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 10 of file linear_tet_map.hpp.
typedef Linear_tet_map< Entity_handle, Matrix> moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::Self [private] |
Definition at line 12 of file linear_tet_map.hpp.
moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::Linear_tet_map | ( | ) | [inline] |
Definition at line 15 of file linear_tet_map.hpp.
moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::Linear_tet_map | ( | const Self & | f | ) | [inline] |
Definition at line 17 of file linear_tet_map.hpp.
double moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::evaluate_scalar_field | ( | const Point & | p, |
const Field & | field_values | ||
) | const [inline, private] |
Definition at line 45 of file linear_tet_map.hpp.
{ double f0 = field_values[ 0]; double f = f0; for(std::size_t i = 1; i < 5; ++i){f+=(field_values[ i] - f0)*p[ i -1];} return f; }
double moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::integrate_scalar_field | ( | const Points & | v, |
const Field & | field_values | ||
) | const [inline, private] |
Definition at line 53 of file linear_tet_map.hpp.
{ double I(0.0); for(unsigned int i = 0; i < 4; ++i) { I += field_values[i]; } double det = 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], v[3][1]-v[0][1], v[1][2]-v[0][2], v[2][2]-v[0][2], v[3][2]-v[0][2]).determinant(); I *= det/24.0; return I; }
bool moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::is_contained | ( | const Point & | result, |
const double | tol = 1e-6 |
||
) | [inline, private] |
Definition at line 36 of file linear_tet_map.hpp.
std::pair< bool, Point> moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::operator() | ( | const Moab & | moab, |
const Entity_handle | _eh, | ||
const Points & | v, | ||
const Point & | p, | ||
const double | tol = 1e-6 |
||
) | [inline] |
Definition at line 20 of file linear_tet_map.hpp.
{ // Remove the warning about unused parameter if (NULL != &moab) {} set_tet( _eh, v); //TODO: Make sure this is correct Point result = Tinv*p; return std::make_pair( is_contained( result, tol), result); }
void moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::set_tet | ( | const Entity_handle | _eh, |
const Points & | v | ||
) | [inline, private] |
Definition at line 67 of file linear_tet_map.hpp.
{ if (eh != _eh){ eh = _eh; Tinv = moab::Matrix::inverse( 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], v[3][1]-v[0][1], v[1][2]-v[0][2], v[2][2]-v[0][2], v[3][2]-v[0][2]) ); } }
Entity_handle moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::eh [private] |
Definition at line 81 of file linear_tet_map.hpp.
Matrix moab::element_utility::Linear_tet_map< Entity_handle, Matrix >::Tinv [private] |
Definition at line 80 of file linear_tet_map.hpp.