44#ifndef KOKKOS_HEXELEMENT_HPP
45#define KOKKOS_HEXELEMENT_HPP
50template<
unsigned NodeCount >
53template<
unsigned NodeCount ,
class Device >
62 static const unsigned element_node_count = 8 ;
63 static const unsigned spatial_dimension = 3 ;
64 static const unsigned integration_count_1d = 2 ;
65 static const unsigned function_count_1d = 2 ;
67 double values_1d [ function_count_1d ][ integration_count_1d ];
68 double derivs_1d [ function_count_1d ][ integration_count_1d ];
69 double weights_1d[ integration_count_1d ];
71 unsigned char eval_map[ element_node_count ][4] ;
75 return 0 == jf ? 0.5 * ( 1.0 - x ) : (
76 1 == jf ? 0.5 * ( 1.0 + x ) : 0 );
81 return 0 == jf ? -0.5 : (
101 { -0.577350269189623 , 0.577350269189623 };
120class HexElement_TensorData< 27 > {
123 static const unsigned element_node_count = 27 ;
124 static const unsigned spatial_dimension = 3 ;
125 static const unsigned integration_count_1d = 3 ;
126 static const unsigned function_count_1d = 3 ;
128 double values_1d [ function_count_1d ][ integration_count_1d ];
129 double derivs_1d [ function_count_1d ][ integration_count_1d ];
130 double weights_1d[ integration_count_1d ];
132 unsigned char eval_map[ element_node_count ][4] ;
142 return 0 == jf ? 0.5 * p * ( p - 1 ) : (
143 1 == jf ? 1.0 - p * p : (
144 2 == jf ? 0.5 * p * ( p + 1 ) : 0 ));
149 return 0 == jf ? p - 0.5 : (
150 1 == jf ? -2.0 * p : (
151 2 == jf ? p + 0.5 : 0 ));
191 const double points_1d[3] = { -0.774596669241483 ,
211template<
unsigned NodeCount >
212class HexElement_Data {
229 const unsigned ipx = tensor_data.eval_map[ip][0] ;
230 const unsigned ipy = tensor_data.eval_map[ip][1] ;
231 const unsigned ipz = tensor_data.eval_map[ip][2] ;
233 weights[ip] = tensor_data.weights_1d[ ipx ] *
234 tensor_data.weights_1d[ ipy ] *
235 tensor_data.weights_1d[ ipz ] ;
239 const unsigned jfx = tensor_data.eval_map[jf][0] ;
240 const unsigned jfy = tensor_data.eval_map[jf][1] ;
241 const unsigned jfz = tensor_data.eval_map[jf][2] ;
243 values[ip][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
244 tensor_data.values_1d[ ipy ][ jfy ] *
245 tensor_data.values_1d[ ipz ][ jfz ] ;
247 gradients[ip][0][jf] = tensor_data.derivs_1d[ ipx ][ jfx ] *
248 tensor_data.values_1d[ ipy ][ jfy ] *
249 tensor_data.values_1d[ ipz ][ jfz ] ;
251 gradients[ip][1][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
252 tensor_data.derivs_1d[ ipy ][ jfy ] *
253 tensor_data.values_1d[ ipz ][ jfz ] ;
255 gradients[ip][2][jf] = tensor_data.values_1d[ ipx ][ jfx ] *
256 tensor_data.values_1d[ ipy ][ jfy ] *
257 tensor_data.derivs_1d[ ipz ][ jfz ] ;
static const unsigned element_node_count
static const unsigned integration_count
double values[integration_count][function_count]
static const unsigned spatial_dimension
static const unsigned function_count
double weights[integration_count]
double gradients[integration_count][spatial_dimension][function_count]
static const unsigned element_node_count
unsigned char eval_map[element_node_count][4]
static const unsigned spatial_dimension
double weights_1d[integration_count_1d]
double derivs_1d[function_count_1d][integration_count_1d]
static double eval_deriv_1d(const unsigned jf, const double p)
static double eval_value_1d(const unsigned jf, const double p)
double values_1d[function_count_1d][integration_count_1d]
static const unsigned integration_count_1d
static const unsigned function_count_1d
static const unsigned integration_count_1d
static const unsigned element_node_count
static double eval_deriv_1d(const unsigned jf, const double)
double weights_1d[integration_count_1d]
static const unsigned spatial_dimension
double derivs_1d[function_count_1d][integration_count_1d]
double values_1d[function_count_1d][integration_count_1d]
static const unsigned function_count_1d
unsigned char eval_map[element_node_count][4]
static double eval_value_1d(const unsigned jf, const double x)