29 #ifndef __SimplexOrdering_H
30 #define __SimplexOrdering_H 1
52 template<u
int16_type Order >
55 static uint16_type f2e( uint16_type , uint16_type e )
59 static const uint16_type __f2e[3];
61 static uint16_type f2eLoc( uint16_type , uint16_type e )
65 static uint16_type f2p( uint16_type , uint16_type p )
69 static const uint16_type __f2p[21];
71 static uint16_type e2p( uint16_type e, uint16_type p )
73 return e2p( e,p,boost::mpl::int_<Order>() );
76 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<1> )
78 return __e2p_order1[2*e+p];
80 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<2> )
82 return __e2p_order2[3*e+p];
84 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<3> )
86 return __e2p_order3[4*e+p];
88 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<4> )
90 return __e2p_order4[5*e+p];
92 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<5> )
94 return __e2p_order5[6*e+p];
97 static const uint16_type __e2p_order1[6];
98 static const uint16_type __e2p_order2[9];
99 static const uint16_type __e2p_order3[12];
100 static const uint16_type __e2p_order4[15];
101 static const uint16_type __e2p_order5[18];
104 std::vector<uint16_type> entity( uint16_type , uint16_type
id )
const
106 std::vector<uint16_type> __entity( 2 );
107 __entity[0] = __e2p_order1[2*id];
108 __entity[1] = __e2p_order1[2*
id+1];
112 template<u
int16_type Order>
113 const uint16_type triangle<Order>::__e2p_order1[6] =
119 template<u
int16_type Order>
120 const uint16_type triangle<Order>::__e2p_order2[9] =
126 template<u
int16_type Order>
127 const uint16_type triangle<Order>::__e2p_order3[12] =
133 template<u
int16_type Order>
134 const uint16_type triangle<Order>::__e2p_order4[15] =
140 template<u
int16_type Order>
141 const uint16_type triangle<Order>::__e2p_order5[18] =
149 template<u
int16_type Order>
150 const uint16_type triangle<Order>::__f2p[21] =
157 15, 16, 17, 18, 19, 20
161 template<u
int16_type Order>
162 const uint16_type triangle<Order>::__f2e[3] =
184 template<u
int16_type Order >
187 static uint16_type f2e( uint16_type f, uint16_type e )
191 static const uint16_type __f2e[12];
193 static uint16_type f2eLoc( uint16_type f, uint16_type e )
195 return __f2eLoc[6*f+e];
197 static const uint16_type __f2eLoc[24];
198 static int16_type f2eOrientation( uint16_type f, uint16_type e )
200 return __f2e_orientation[3*f+e];
202 static const int16_type __f2e_orientation[12];
205 static uint16_type f2p( uint16_type e, uint16_type p )
207 return f2p( e,p,boost::mpl::int_<( Order>4 )?1:Order>() );
209 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<1> )
211 return __f2p_order1[3*f+p];
213 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<2> )
215 return __f2p_order2[6*f+p];
217 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<3> )
219 return __f2p_order3[10*f+p];
221 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<4> )
223 return __f2p_order4[15*f+p];
225 static const uint16_type __f2p_order1[12];
226 static const uint16_type __f2p_order2[24];
227 static const uint16_type __f2p_order3[40];
228 static const uint16_type __f2p_order4[60];
230 static uint16_type e2p( uint16_type e, uint16_type p )
232 return e2p( e,p,boost::mpl::int_<Order>() );
234 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<1> )
236 return __e2p_order1[2*e+p];
238 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<2> )
240 return __e2p_order2[3*e+p];
242 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<3> )
244 return __e2p_order3[4*e+p];
246 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<4> )
248 return __e2p_order4[5*e+p];
250 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<5> )
252 return __e2p_order5[6*e+p];
255 static const uint16_type __e2p_order1[12];
256 static const uint16_type __e2p_order2[18];
257 static const uint16_type __e2p_order3[24];
258 static const uint16_type __e2p_order4[30];
259 static const uint16_type __e2p_order5[36];
261 std::vector<uint16_type> entity( uint16_type topo_dim, uint16_type
id )
const
263 std::vector<uint16_type> __entity( topo_dim+1 );
267 __entity[0] = __e2p_order1[2*id];
268 __entity[1] = __e2p_order1[2*
id+1];
272 else if ( topo_dim == 2 )
274 __entity[0] = __f2p_order1[3*id];
275 __entity[1] = __f2p_order1[3*
id+1];
276 __entity[2] = __f2p_order1[3*
id+2];
282 template<u
int16_type Order >
283 const uint16_type tetra<Order>::__e2p_order1[12] =
293 template<u
int16_type Order >
294 const uint16_type tetra<Order>::__e2p_order2[18] =
304 template<u
int16_type Order >
305 const uint16_type tetra<Order>::__e2p_order3[24] =
315 template<u
int16_type Order >
316 const uint16_type tetra<Order>::__e2p_order4[30] =
327 template<u
int16_type Order >
328 const uint16_type tetra<Order>::__e2p_order5[36] =
332 0, 1, 12, 13, 14, 15,
333 0, 3, 16, 17, 18, 19,
334 1, 3, 20, 21, 22, 23,
339 template<u
int16_type Order >
340 const uint16_type tetra<Order>::__f2p_order1[12] =
348 template<u
int16_type Order >
349 const uint16_type tetra<Order>::__f2p_order2[24] =
357 template<u
int16_type Order >
358 const uint16_type tetra<Order>::__f2p_order3[40] =
360 1, 2, 3, 14, 15, 13, 12, 4, 5, 16,
361 0, 2, 3, 14, 15, 11, 10, 7, 6, 17,
362 0, 1, 3, 12, 13, 11, 10, 8, 9, 18,
363 0, 1, 2, 4, 5, 6, 7, 8, 9, 19
366 template<u
int16_type Order >
367 const uint16_type tetra<Order>::__f2p_order4[60] =
369 1, 2, 3, 19, 20, 21, 18, 17, 16, 4, 5, 6, 22, 23, 24,
370 0, 2, 3, 19, 20, 21, 15, 14, 13, 9, 8, 7, 25, 26, 27,
371 0, 1, 3, 16, 17, 18, 15, 14, 13, 10, 11, 12, 28, 29, 30,
372 0, 1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 31, 32, 33
375 template<u
int16_type Order >
376 const uint16_type tetra<Order>::__f2e[12] =
385 template<u
int16_type Order >
386 const uint16_type tetra<Order>:: __f2eLoc[24] =
388 2 , 99, 99, 99, 1, 0,
394 template<u
int16_type Order >
395 const int16_type tetra<Order>::__f2e_orientation[12] =