20 #ifndef _GEOENTITY_HH_
21 #define _GEOENTITY_HH_
25 #include <boost/version.hpp>
26 #if (BOOST_VERSION >= 103400)
27 #include <boost/none.hpp>
29 #include <boost/none_t.hpp>
32 #include <boost/mpl/vector.hpp>
33 #include <boost/mpl/vector_c.hpp>
34 #include <boost/operators.hpp>
36 #include <feel/feelcore/feel.hpp>
37 #include <feel/feelcore/context.hpp>
42 enum FaceLocation { INTERNAL =
false, ON_BOUNDARY =
true };
73 SHAPE_LINEAR = ( 1<<0 ),
74 SHAPE_BILINEAR = ( 1<<1 ),
75 SHAPE_QUADRATIC= ( 1<<2 ),
76 SHAPE_NONE = ( 1<<3 ),
77 SHAPE_POINT = ( 1<<4 ),
78 SHAPE_LINE = ( 1<<5 ),
79 SHAPE_TRIANGLE = ( 1<<6 ),
80 SHAPE_QUAD = ( 1<<7 ),
81 SHAPE_HEXA = ( 1<<8 ),
82 SHAPE_PRISM = ( 1<<9 ),
83 SHAPE_TETRA = ( 1<<10 ),
84 SHAPE_SP4 = ( 1<<11 ),
100 template<u
int16_type td>
103 typedef typename mpl::if_<mpl::equal_to<mpl::int_<td>, mpl::int_<0> >,
104 mpl::int_<E::numVertices>,
105 typename mpl::if_<mpl::equal_to<mpl::int_<td>, mpl::int_<1> >,
106 mpl::int_<E::numEdges>,
107 typename mpl::if_<mpl::equal_to<mpl::int_<td>, mpl::int_<2> >,
108 mpl::int_<E::numGeometricFaces>,
109 mpl::int_<E::numVolumes>
113 static const uint16_type value = type::value;
117 EntityRange( uint16_type td = 0 )
123 EntityRange( EntityRange
const& r ) : d( r.d ) {}
126 uint16_type topologicalDimension()
const
131 void setTopologicalDimension( uint16_type td )
137 uint16_type begin()
const
141 uint16_type end()
const
144 return num<0>::value;
147 return num<1>::value;
150 return num<2>::value;
153 return num<3>::value;
155 return num<0>::value;
158 void check_invariant()
167 template<
int N,
int P>
170 static const size_type value = N*pow<N, P-1>::value;
185 struct no_permutation:
public boost::detail::identifier<uint16_type, no_permutation>
187 static const uint16_type NO_PERMUTATION = 0;
188 static const uint16_type IDENTITY = 1;
189 static const uint16_type N_PERMUTATIONS = 2;
190 typedef boost::detail::identifier<uint16_type, no_permutation> super;
191 typedef super::value_type value_type;
192 no_permutation() : super( IDENTITY ) {}
193 explicit no_permutation( value_type v ) : super( v ) {}
194 no_permutation &
operator=( value_type v )
199 no_permutation& operator++()
201 this->assign( this->value()+1 );
213 struct line_permutations:
public boost::detail::identifier<uint16_type, line_permutations>
215 static const uint16_type NO_PERMUTATION = 0;
216 static const uint16_type IDENTITY = 1;
217 static const uint16_type REVERSE_PERMUTATION = 2;
218 static const uint16_type N_PERMUTATIONS = 3;
219 typedef boost::detail::identifier<uint16_type, line_permutations> super;
220 typedef super::value_type value_type;
221 line_permutations() : super( IDENTITY ) {}
222 explicit line_permutations( value_type v ) : super( v ) {}
223 line_permutations&
operator=( value_type v )
228 line_permutations& operator++()
230 this->assign( this->value()+1 );
235 enum line_permutations_dummy {};
237 struct triangular_faces_type:
public boost::detail::identifier<uint16_type, triangular_faces_type>
239 static const uint16_type NO_PERMUTATION = 0;
240 static const uint16_type IDENTITY = 1;
241 static const uint16_type REVERSE_HEIGHT = 2;
242 static const uint16_type REVERSE_BASE = 3;
243 static const uint16_type REVERSE_HYPOTENUSE = 4;
244 static const uint16_type ROTATION_ANTICLOCK = 5;
245 static const uint16_type ROTATION_CLOCKWISE = 6;
246 static const uint16_type N_PERMUTATIONS = 7;
248 static const uint16_type PRINCIPAL_DIAGONAL = 4;
249 static const uint16_type SECOND_DIAGONAL = 7;
250 static const uint16_type ROTATION_TWICE_CLOCKWISE = 8;
252 typedef boost::detail::identifier<uint16_type, triangular_faces_type> super;
253 typedef super::value_type value_type;
254 triangular_faces_type() : super( IDENTITY ) {}
255 explicit triangular_faces_type( value_type v ) : super( v ) {}
257 triangular_faces_type &
operator=( value_type v )
262 triangular_faces_type& operator++()
264 this->assign( this->value()+1 );
269 struct quadrangular_faces:
public boost::detail::identifier<uint16_type, quadrangular_faces>
271 static const uint16_type NO_PERMUTATION = 0;
272 static const uint16_type IDENTITY = 1;
273 static const uint16_type REVERSE_HEIGHT = 2;
274 static const uint16_type REVERSE_BASE = 3;
275 static const uint16_type PRINCIPAL_DIAGONAL = 4;
276 static const uint16_type ROTATION_ANTICLOCK = 5;
277 static const uint16_type ROTATION_CLOCKWISE = 6;
278 static const uint16_type SECOND_DIAGONAL = 7;
279 static const uint16_type ROTATION_TWICE_CLOCKWISE = 8;
281 static const uint16_type N_PERMUTATIONS = 9;
283 static const uint16_type REVERSE_HYPOTENUSE = 4;
285 typedef boost::detail::identifier<uint16_type, quadrangular_faces> super;
286 typedef super::value_type value_type;
287 quadrangular_faces() : super( IDENTITY ) {}
288 explicit quadrangular_faces( value_type v ) : super( v ) {}
290 quadrangular_faces &
operator=( value_type v )
295 quadrangular_faces& operator++()
297 this->assign( this->value()+1 );
Definition: entities.hpp:49
Definition: entities.hpp:63
Definition: entities.hpp:61
Definition: entities.hpp:60
Definition: entities.hpp:62
GeoEntityContext
Definition: entities.hpp:47
Definition: entities.hpp:59
size_t size_type
Indices (starting from 0)
Definition: feelcore/feel.hpp:319
Definition: entities.hpp:64
Elements & operator=(Elements const &e)
Definition: elements.hpp:335
ReferenceGeometry
Definition: entities.hpp:57
Definition: entities.hpp:50