85template < std::
floating_po
int T >
86KOKKOS_INLINE_FUNCTION
constexpr T
shape_rad(
const int node_idx,
const T zeta )
88 const T N_rad[2] = {
static_cast< T
>( 0.5 ) * ( 1 - zeta ),
static_cast< T
>( 0.5 ) * ( 1 + zeta ) };
89 return N_rad[node_idx / 3];
101template < std::
floating_po
int T >
104 return shape_rad( node_idx, xi_eta_zeta( 2 ) );
117template < std::
floating_po
int T >
118KOKKOS_INLINE_FUNCTION
constexpr T
shape_lat(
const int node_idx,
const T xi,
const T eta )
120 const T N_lat[3] = {
static_cast< T
>( 1.0 ) - xi - eta, xi, eta };
121 return N_lat[node_idx % 3];
134template < std::
floating_po
int T >
137 return shape_lat( node_idx, xi_eta_zeta( 0 ), xi_eta_zeta( 1 ) );
145template < std::
floating_po
int T >
146KOKKOS_INLINE_FUNCTION
constexpr T
shape(
const int node_idx,
const T xi,
const T eta,
const T zeta )
156template < std::
floating_po
int T >
171template < std::
floating_po
int T >
174 constexpr T grad_N_rad[2] = { -0.5, 0.5 };
175 return grad_N_rad[node_idx / 3];
187template < std::
floating_po
int T >
190 constexpr T grad_N_lat_xi[3] = { -1.0, 1.0, 0.0 };
191 return grad_N_lat_xi[node_idx % 3];
203template < std::
floating_po
int T >
206 constexpr T grad_N_lat_eta[3] = { -1.0, 0.0, 1.0 };
207 return grad_N_lat_eta[node_idx % 3];
226template < std::
floating_po
int T >
228 grad_shape(
const int node_idx,
const T xi,
const T eta,
const T zeta )
231 grad_N( 0 ) = grad_shape_lat_xi< T >( node_idx ) *
shape_rad( node_idx, zeta );
232 grad_N( 1 ) = grad_shape_lat_eta< T >( node_idx ) *
shape_rad( node_idx, zeta );
233 grad_N( 2 ) =
shape_lat( node_idx, xi, eta ) * grad_shape_rad< T >( node_idx );
253template < std::
floating_po
int T >
257 return grad_shape( node_idx, xi_eta_zeta( 0 ), xi_eta_zeta( 1 ), xi_eta_zeta( 2 ) );
266template < std::
floating_po
int T >
267KOKKOS_INLINE_FUNCTION
constexpr T
268 shape_rad_coarse(
const int coarse_node_idx,
const int fine_radial_wedge_idx,
const T zeta_fine )
270 switch ( coarse_node_idx / 3 )
273 switch ( fine_radial_wedge_idx )
279 return 0.25 * ( 3 - zeta_fine );
284 return 0.25 * ( 1 - zeta_fine );
289 switch ( fine_radial_wedge_idx )
295 return 0.25 * ( 1 + zeta_fine );
300 return 0.25 * ( 3 + zeta_fine );
320template < std::
floating_po
int T >
321KOKKOS_INLINE_FUNCTION
constexpr T
324 switch ( coarse_node_idx % 3 )
330 return -0.5 * eta_fine - 0.5 * xi_fine + 1.0;
332 return -0.5 * eta_fine - 0.5 * xi_fine + 0.5;
334 return -0.5 * eta_fine - 0.5 * xi_fine + 0.5;
336 return 0.5 * eta_fine + 0.5 * xi_fine;
344 return 0.5 * xi_fine;
346 return 0.5 * xi_fine + 0.5;
348 return 0.5 * xi_fine;
350 return 0.5 - 0.5 * xi_fine;
358 return 0.5 * eta_fine;
360 return 0.5 * eta_fine;
362 return 0.5 * eta_fine + 0.5;
364 return 0.5 - 0.5 * eta_fine;
372template < std::
floating_po
int T >
374 const int coarse_node_idx,
375 const int fine_radial_wedge_idx,
384template < std::
floating_po
int T >
386 const int coarse_node_idx,
387 const int fine_radial_wedge_idx,
392 shape_rad_coarse( coarse_node_idx, fine_radial_wedge_idx, xi_eta_zeta_fine( 2 ) );
394template < std::
floating_po
int T >
395KOKKOS_INLINE_FUNCTION
constexpr T
grad_shape_rad_coarse(
const int coarse_node_idx,
const int fine_radial_wedge_idx )
397 switch ( coarse_node_idx / 3 )
400 switch ( fine_radial_wedge_idx )
416 switch ( fine_radial_wedge_idx )
435template < std::
floating_po
int T >
436KOKKOS_INLINE_FUNCTION
constexpr T
440 switch ( coarse_node_idx % 3 )
489template < std::
floating_po
int T >
490KOKKOS_INLINE_FUNCTION
constexpr T
494 switch ( coarse_node_idx % 3 )
543template < std::
floating_po
int T >
546 const int fine_radial_wedge_idx,
558 grad_shape_rad_coarse< T >( node_idx, fine_radial_wedge_idx );
562template < std::
floating_po
int T >
565 const int fine_radial_wedge_idx,
571 fine_radial_wedge_idx,
573 xi_eta_zeta_fine( 0 ),
574 xi_eta_zeta_fine( 1 ),
575 xi_eta_zeta_fine( 2 ) );
578template < std::
floating_po
int T >
579KOKKOS_INLINE_FUNCTION
constexpr T
forward_map_rad(
const T r_1,
const T r_2,
const T zeta )
581 return r_1 + 0.5 * ( r_2 - r_1 ) * ( 1 + zeta );
584template < std::
floating_po
int T >
592 return ( 1 - xi - eta ) * p1_phy + xi * p2_phy + eta * p3_phy;
595template < std::
floating_po
int T >
598 return 0.5 * ( r_2 - r_1 );
601template < std::
floating_po
int T >
607 return p2_phy - p1_phy;
610template < std::
floating_po
int T >
616 return p3_phy - p1_phy;
619template < std::
floating_po
int T >
633template < std::
floating_po
int T >
641template < std::
floating_po
int T >
652 return jac_lat( p1_phy, p2_phy, p3_phy, xi, eta ) *
656template < std::
floating_po
int T >
661 p_phy[0], p_phy[1], p_phy[2], r_1, r_2, xi_eta_zeta_fine( 0 ), xi_eta_zeta_fine( 1 ), xi_eta_zeta_fine( 2 ) );
670template < std::
floating_po
int T >
Features for wedge elements.
constexpr T grad_shape_lat_xi(const int node_idx)
Gradient of the lateral part of the shape function, in xi direction .
Definition integrands.hpp:188
constexpr T grad_shape_lat_coarse_eta(const int coarse_node_idx, const int fine_lateral_wedge_idx)
Definition integrands.hpp:491
constexpr dense::Vec< T, 3 > forward_map_lat(const dense::Vec< T, 3 > &p1_phy, const dense::Vec< T, 3 > &p2_phy, const dense::Vec< T, 3 > &p3_phy, const T xi, const T eta)
Definition integrands.hpp:585
constexpr dense::Vec< T, 3 > grad_forward_map_lat_xi(const dense::Vec< T, 3 > &p1_phy, const dense::Vec< T, 3 > &p2_phy, const dense::Vec< T, 3 > &)
Definition integrands.hpp:602
constexpr dense::Mat< T, 3, 3 > symmetric_grad(const dense::Mat< T, 3, 3 > &J_inv_transposed, const dense::Vec< T, 3 > &quad_point, const int dof, const int dim)
Returns the symmetric gradient of the shape function of a dof at a quadrature point.
Definition integrands.hpp:671
constexpr int fine_lateral_wedge_idx(const int x_cell_fine, const int y_cell_fine, const int wedge_idx_fine)
Returns the lateral wedge index with respect to a coarse grid wedge from the fine wedge indices.
Definition kernel_helpers.hpp:601
constexpr T grad_forward_map_rad(const T r_1, const T r_2)
Definition integrands.hpp:596
constexpr T shape_rad(const int node_idx, const T zeta)
Radial shape function.
Definition integrands.hpp:86
constexpr T shape_lat(const int node_idx, const T xi, const T eta)
Lateral shape function.
Definition integrands.hpp:118
constexpr T forward_map_rad(const T r_1, const T r_2, const T zeta)
Definition integrands.hpp:579
constexpr T shape_coarse(const int coarse_node_idx, const int fine_radial_wedge_idx, const int fine_lateral_wedge_idx, const T xi_fine, const T eta_fine, const T zeta_fine)
Definition integrands.hpp:373
constexpr dense::Vec< T, 3 > jac_rad(const T r_1, const T r_2, const T zeta)
Definition integrands.hpp:634
constexpr T grad_shape_lat_eta(const int node_idx)
Gradient of the lateral part of the shape function, in eta direction .
Definition integrands.hpp:204
constexpr dense::Mat< T, 3, 3 > jac_lat(const dense::Vec< T, 3 > &p1_phy, const dense::Vec< T, 3 > &p2_phy, const dense::Vec< T, 3 > &p3_phy, const T xi, const T eta)
Definition integrands.hpp:620
constexpr T grad_shape_lat_coarse_xi(const int coarse_node_idx, const int fine_lateral_wedge_idx)
Definition integrands.hpp:437
constexpr dense::Vec< T, 3 > grad_forward_map_lat_eta(const dense::Vec< T, 3 > &p1_phy, const dense::Vec< T, 3 > &, const dense::Vec< T, 3 > &p3_phy)
Definition integrands.hpp:611
constexpr T shape_rad_coarse(const int coarse_node_idx, const int fine_radial_wedge_idx, const T zeta_fine)
Returns the coarse grid radial shape function evaluated at a point of the reference fine grid wedge.
Definition integrands.hpp:268
constexpr dense::Vec< T, 3 > grad_shape(const int node_idx, const T xi, const T eta, const T zeta)
Gradient of the full shape function:
Definition integrands.hpp:228
constexpr dense::Vec< T, 3 > grad_shape_coarse(const int node_idx, const int fine_radial_wedge_idx, const int fine_lateral_wedge_idx, const T xi, const T eta, const T zeta)
Definition integrands.hpp:544
constexpr T grad_shape_rad(const int node_idx)
Gradient of the radial part of the shape function, in the radial direction .
Definition integrands.hpp:172
constexpr T shape(const int node_idx, const T xi, const T eta, const T zeta)
(Tensor-product) Shape function.
Definition integrands.hpp:146
constexpr T grad_shape_rad_coarse(const int coarse_node_idx, const int fine_radial_wedge_idx)
Definition integrands.hpp:395
constexpr dense::Mat< T, 3, 3 > jac(const dense::Vec< T, 3 > &p1_phy, const dense::Vec< T, 3 > &p2_phy, const dense::Vec< T, 3 > &p3_phy, const T r_1, const T r_2, const T xi, const T eta, const T zeta)
Definition integrands.hpp:643
constexpr T shape_lat_coarse(const int coarse_node_idx, const int fine_lateral_wedge_idx, const T xi_fine, const T eta_fine)
Returns the coarse grid lateral shape function evaluated at a point of the reference fine grid wedge.
Definition integrands.hpp:322
static constexpr Mat diagonal_from_vec(const Vec< T, Rows > &diagonal)
Definition mat.hpp:79
static constexpr Mat from_col_vecs(const Vec< T, Rows > &col0, const Vec< T, Rows > &col1)
Definition mat.hpp:36
constexpr Mat< T, Cols, Rows > transposed() const
Definition mat.hpp:187
static constexpr Mat from_single_col_vec(const Vec< T, Cols > &col, const int d)
Definition mat.hpp:66