29 #ifndef __HyperCubeOrdering_H
30 #define __HyperCubeOrdering_H 1
54 template<u
int16_type Order >
57 static uint16_type f2e( uint16_type , uint16_type e )
61 static const uint16_type __f2e[4];
63 static uint16_type f2p( uint16_type , uint16_type p )
67 static const uint16_type __f2p[4];
69 static uint16_type e2p( uint16_type e, uint16_type p )
71 return e2p( e,p,boost::mpl::int_<( Order>3 )?1:Order>() );
73 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<1> )
75 return __e2p_order1[2*e+p];
77 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<2> )
79 return __e2p_order1[3*e+p];
81 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<3> )
83 return __e2p_order1[4*e+p];
85 static const uint16_type __e2p_order1[8];
86 static const uint16_type __e2p_order2[12];
87 static const uint16_type __e2p_order3[16];
89 std::vector<uint16_type> entity( uint16_type , uint16_type
id )
const
91 std::vector<uint16_type> __entity( 2 );
92 __entity[0] = __e2p_order1[2*id];
93 __entity[1] = __e2p_order1[2*
id+1];
98 template<u
int16_type Order >
99 const uint16_type quad<Order>::__e2p_order1[8] =
107 template<u
int16_type Order >
108 const uint16_type quad<Order>::__e2p_order2[12] =
116 template<u
int16_type Order >
117 const uint16_type quad<Order>::__e2p_order3[16] =
126 template<u
int16_type Order >
127 const uint16_type quad<Order>::__f2p[4] =
134 template<u
int16_type Order >
135 const uint16_type quad<Order>::__f2e[4] =
160 template<u
int16_type Order >
164 static uint16_type f2e( uint16_type f, uint16_type e )
168 static const uint16_type __f2e[24];
169 static int16_type f2ePermutation( uint16_type f, uint16_type e )
171 return __f2e_permutation[4*f+e];
173 static const int16_type __f2e_permutation[24];
176 static uint16_type f2p( uint16_type e, uint16_type p )
178 return f2p( e,p,boost::mpl::int_<( Order>3 )?1:Order>() );
180 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<1> )
182 return __f2p_order1[4*f+p];
184 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<2> )
186 return __f2p_order2[9*f+p];
188 static uint16_type f2p( uint16_type f, uint16_type p, boost::mpl::int_<3> )
190 return __f2p_order3[16*f+p];
193 static const uint16_type __f2p_order1[24];
194 static const uint16_type __f2p_order2[54];
195 static const uint16_type __f2p_order3[96];
198 static uint16_type e2p( uint16_type e, uint16_type p )
200 return e2p( e,p,boost::mpl::int_<( Order>3 )?1:Order>() );
202 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<1> )
204 return __e2p_order1[2*e+p];
206 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<2> )
208 return __e2p_order2[3*e+p];
210 static uint16_type e2p( uint16_type e, uint16_type p,boost::mpl::int_<3> )
212 return __e2p_order3[4*e+p];
215 static const uint16_type __e2p_order1[24];
216 static const uint16_type __e2p_order2[36];
217 static const uint16_type __e2p_order3[48];
220 std::vector<uint16_type> entity( uint16_type topo_dim, uint16_type
id )
const
222 std::vector<uint16_type> __entity( 2*topo_dim );
226 __entity[0] = __e2p_order1[2*id];
227 __entity[1] = __e2p_order1[2*
id+1];
231 else if ( topo_dim == 2 )
233 __entity[0] = __f2p_order1[4*id];
234 __entity[1] = __f2p_order1[4*
id+1];
235 __entity[2] = __f2p_order1[4*
id+2];
236 __entity[3] = __f2p_order1[4*
id+3];
244 template<u
int16_type Order >
245 const uint16_type hexa<Order>::__e2p_order1[24] =
261 template<u
int16_type Order >
262 const uint16_type hexa<Order>::__e2p_order2[36] =
279 template<u
int16_type Order >
280 const uint16_type hexa<Order>::__e2p_order3[48] =
298 template<u
int16_type Order >
299 const uint16_type hexa<Order>::__f2p_order1[24] =
309 template<u
int16_type Order >
310 const uint16_type hexa<Order>::__f2p_order2[54] =
312 0, 1, 2, 3, 8, 9, 10, 11, 20,
313 0, 1, 5, 4, 8, 12, 13, 14, 21,
314 1, 2, 6, 5, 9, 15, 16, 12, 22,
315 2, 3, 7, 6, 10, 17, 18, 15, 23,
316 3, 0, 4, 7, 11, 14, 19, 17, 24,
317 4, 5, 6, 7, 13, 16, 18, 19, 25
321 template<u
int16_type Order >
322 const uint16_type hexa<Order>::__f2p_order3[96] =
324 0, 1, 2, 3, 8, 9, 10, 11, 12, 13, 14, 15, 32, 33, 34, 35,
325 0, 1, 5, 4, 8, 9, 16, 17, 18, 19, 20, 21, 36, 37, 38, 39,
326 1, 2, 6, 5, 10, 11, 22, 23, 24, 25, 17, 16, 40, 41, 42, 43,
327 2, 3, 7, 6, 12, 13, 26, 27, 28, 29, 23, 22, 44, 45, 46, 47,
328 3, 0, 4, 7, 14, 15, 21, 20, 30, 31, 27, 26, 48, 49, 50, 51,
329 4, 5, 6, 7, 19, 18, 25, 24, 29, 28, 31, 30, 52, 53, 54, 55
333 template<u
int16_type Order >
334 const uint16_type hexa<Order>::__f2e[24] =
345 template<u
int16_type Order >
346 const int16_type hexa<Order>::__f2e_permutation[24] =