1 #ifndef MOAB_PARAMETRIZER_HPP
2 #define MOAB_PARAMETRIZER_HPP
5 #include "moab/ElemUtil.hpp"
9 namespace element_utility
15 template <
typename Moab,
typename Entity_handle,
typename Po
ints >
16 void get_moab_points( Moab&
moab, Entity_handle eh,
Points& points )
18 const Entity_handle* connectivity_begin;
20 moab.get_connectivity( eh, connectivity_begin, num_vertices );
25 points.resize( num_vertices );
26 moab.get_coords( connectivity_begin, num_vertices, &( points[0][0] ) );
31 template <
typename Element_map >
36 typedef Element_map
Map;
46 template <
typename Moab,
typename Entity_handle,
typename Po
int >
47 std::pair< bool, Point >
operator()( Moab&
moab,
const Entity_handle& eh,
const Point& point,
const double tol )
49 typedef std::vector< moab::CartVect >
Points;
51 get_moab_points(
moab, eh, points );
52 return map(
moab, eh, points, point, tol );
70 template <
typename Moab,
typename Entity_handle,
typename Po
int >
74 typedef std::vector< moab::CartVect >
Points;
76 get_moab_points(
moab, eh, points );
78 switch(
moab.type_from_handle( eh ) )
90 std::cerr <<
"Element type not supported" << std::endl;
91 return make_pair(
false, Point( 3, 0.0 ) );
94 template <
typename Moab,
typename Entity_handle,
typename Po
int >