/home/runner/work/kynema/kynema/kynema/src/system/beams/interpolate_to_quadrature_point_for_stiffness.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/system/beams/interpolate_to_quadrature_point_for_stiffness.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
interpolate_to_quadrature_point_for_stiffness.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <KokkosBlas.hpp>
4#include <Kokkos_Core.hpp>
5
6namespace kynema::beams {
7
8template <typename DeviceType>
10 template <typename ValueType>
11 using View = Kokkos::View<ValueType, DeviceType>;
12 template <typename ValueType>
14 template <typename ValueType>
15 using LeftView = Kokkos::View<ValueType, Kokkos::LayoutLeft, DeviceType>;
16 template <typename ValueType>
18
20 double jacobian, const ConstLeftView<double*>& shape_interp,
21 const ConstLeftView<double*>& shape_deriv, const ConstView<double* [7]>& node_u,
22 const View<double[3]>& u, const View<double[4]>& r, const View<double[3]>& u_prime,
23 const View<double[4]>& r_prime
24 ) {
25 for (auto node = 0U; node < node_u.extent(0); ++node) {
26 const auto phi = shape_interp(node);
27 const auto dphiJ = shape_deriv(node) / jacobian;
28 for (auto component = 0U; component < 3U; ++component) {
29 u(component) += node_u(node, component) * phi;
30 u_prime(component) += node_u(node, component) * dphiJ;
31 }
32 for (auto component = 0U; component < 4U; ++component) {
33 r(component) += node_u(node, component + 3) * phi;
34 r_prime(component) += node_u(node, component + 3) * dphiJ;
35 }
36 }
37 const auto r_length = KokkosBlas::serial_nrm2(r);
38 for (auto component = 0U; component < 4U; ++component) {
40 }
41 }
42};
43} // namespace kynema::beams
Definition beam_quadrature.hpp:16
Definition interpolate_to_quadrature_point_for_stiffness.hpp:9
typename LeftView< ValueType >::const_type ConstLeftView
Definition interpolate_to_quadrature_point_for_stiffness.hpp:17
static KOKKOS_FUNCTION void invoke(double jacobian, const ConstLeftView< double * > &shape_interp, const ConstLeftView< double * > &shape_deriv, const ConstView< double *[7]> &node_u, const View< double[3]> &u, const View< double[4]> &r, const View< double[3]> &u_prime, const View< double[4]> &r_prime)
Definition interpolate_to_quadrature_point_for_stiffness.hpp:19
Kokkos::View< ValueType, DeviceType > View
Definition interpolate_to_quadrature_point_for_stiffness.hpp:11
Kokkos::View< ValueType, Kokkos::LayoutLeft, DeviceType > LeftView
Definition interpolate_to_quadrature_point_for_stiffness.hpp:15
typename View< ValueType >::const_type ConstView
Definition interpolate_to_quadrature_point_for_stiffness.hpp:13