3#include <Kokkos_Core.hpp>
7template <
typename shape_matrix_type,
typename node_type,
typename qp_type>
9 const shape_matrix_type& shape_matrix,
const node_type& node_v,
const qp_type& qp_v
11 for (
auto qp = 0; qp < qp_v.extent_int(0); ++qp) {
12 auto local_total = Kokkos::Array<double, 3>{};
13 for (
auto node = 0; node < node_v.extent_int(0); ++node) {
14 const auto phi = shape_matrix(node, qp);
15 for (
auto component = 0; component < 3; ++component) {
16 local_total[component] += node_v(node, component) * phi;
19 for (
auto component = 0; component < 3; ++component) {
20 qp_v(qp, component) = local_total[component];
25template <
typename shape_matrix_type,
typename node_type,
typename qp_type>
27 const shape_matrix_type& shape_matrix,
const node_type& node_v,
const qp_type& qp_v
29 for (
auto qp = 0; qp < qp_v.extent_int(0); ++qp) {
30 auto local_total = Kokkos::Array<double, 4>{};
31 for (
auto node = 0; node < node_v.extent_int(0); ++node) {
32 const auto phi = shape_matrix(node, qp);
33 for (
auto component = 0; component < 4; ++component) {
34 local_total[component] += node_v(node, component) * phi;
37 for (
auto component = 0; component < 4; ++component) {
38 qp_v(qp, component) = local_total[component];
43template <
typename shape_matrix_type,
typename node_type,
typename qp_type>
45 const shape_matrix_type& shape_matrix,
const node_type& node_v,
const qp_type& qp_v
48 static constexpr auto length_zero_result = Kokkos::Array<double, 4>{1., 0., 0., 0.};
49 for (
auto qp = 0; qp < qp_v.extent_int(0); ++qp) {
50 auto length = Kokkos::sqrt(
51 Kokkos::pow(qp_v(qp, 0), 2) + Kokkos::pow(qp_v(qp, 1), 2) + Kokkos::pow(qp_v(qp, 2), 2) +
52 Kokkos::pow(qp_v(qp, 3), 2)
55 for (
auto component = 0; component < 4; ++component) {
56 qp_v(qp, component) = length_zero_result[component];
59 for (
auto component = 0; component < 4; ++component) {
60 qp_v(qp, component) /= length;
66template <
typename shape_matrix_type,
typename jacobian_type,
typename node_type,
typename qp_type>
68 const shape_matrix_type& shape_matrix_deriv,
const jacobian_type& jacobian,
69 const node_type& node_v,
const qp_type& qp_v
72 for (
auto qp = 0; qp < qp_v.extent_int(0); ++qp) {
73 const auto jac = jacobian(qp);
74 for (
auto component = 0; component < qp_v.extent_int(1); ++component) {
75 qp_v(qp, component) /= jac;
80template <
typename shape_matrix_type,
typename jacobian_type,
typename node_type,
typename qp_type>
82 const shape_matrix_type& shape_matrix_deriv,
const jacobian_type& jacobian,
83 const node_type& node_v,
const qp_type& qp_v
86 for (
auto qp = 0; qp < qp_v.extent_int(0); ++qp) {
87 const auto jac = jacobian(qp);
88 for (
auto component = 0; component < qp_v.extent_int(1); ++component) {
89 qp_v(qp, component) /= jac;
Definition beam_quadrature.hpp:16
KOKKOS_INLINE_FUNCTION void InterpVector3Deriv(const shape_matrix_type &shape_matrix_deriv, const jacobian_type &jacobian, const node_type &node_v, const qp_type &qp_v)
Definition interpolation_operations.hpp:67
KOKKOS_INLINE_FUNCTION void InterpVector4(const shape_matrix_type &shape_matrix, const node_type &node_v, const qp_type &qp_v)
Definition interpolation_operations.hpp:26
KOKKOS_INLINE_FUNCTION void InterpQuaternion(const shape_matrix_type &shape_matrix, const node_type &node_v, const qp_type &qp_v)
Definition interpolation_operations.hpp:44
KOKKOS_INLINE_FUNCTION void InterpVector4Deriv(const shape_matrix_type &shape_matrix_deriv, const jacobian_type &jacobian, const node_type &node_v, const qp_type &qp_v)
Definition interpolation_operations.hpp:81
KOKKOS_INLINE_FUNCTION void InterpVector3(const shape_matrix_type &shape_matrix, const node_type &node_v, const qp_type &qp_v)
Definition interpolation_operations.hpp:8