/home/runner/work/kynema/kynema/kynema/src/elements/beams/calculate_QP_position.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/elements/beams/calculate_QP_position.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
calculate_QP_position.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Kokkos_Core.hpp>
4
6
7namespace kynema::beams {
8
25template <typename DeviceType>
27 template <typename ValueType>
28 using View = Kokkos::View<ValueType, DeviceType>;
29 template <typename ValueType>
31
32 size_t element;
38
39 KOKKOS_FUNCTION void operator()(int qp) const {
40 using Kokkos::ALL;
41 using Kokkos::subview;
42
43 // Calculate current position
44 qp_x_(element, qp, 0) = qp_x0_(element, qp, 0) + qp_u_(element, qp, 0);
45 qp_x_(element, qp, 1) = qp_x0_(element, qp, 1) + qp_u_(element, qp, 1);
46 qp_x_(element, qp, 2) = qp_x0_(element, qp, 2) + qp_u_(element, qp, 2);
47
48 // Calculate current orientation
49 auto RR0_data = Kokkos::Array<double, 4>{};
50 auto RR0 = View<double[4]>(RR0_data.data());
53 );
54 qp_x_(element, qp, 3) = RR0(0);
55 qp_x_(element, qp, 4) = RR0(1);
56 qp_x_(element, qp, 5) = RR0(2);
57 qp_x_(element, qp, 6) = RR0(3);
58 }
59};
60
61} // namespace kynema::beams
Definition beam_quadrature.hpp:16
KOKKOS_INLINE_FUNCTION void QuaternionCompose(const Quaternion1 &q1, const Quaternion2 &q2, QuaternionN &qn)
Composes (i.e. multiplies) two quaternions and stores the result in a third quaternion.
Definition quaternion_operations.hpp:204
Functor to calculate current position and orientation at quadrature points.
Definition calculate_QP_position.hpp:26
ConstView< double **[3]> qp_x0_
Definition calculate_QP_position.hpp:33
View< double **[7]> qp_x_
Definition calculate_QP_position.hpp:37
size_t element
Definition calculate_QP_position.hpp:32
Kokkos::View< ValueType, DeviceType > View
Definition calculate_QP_position.hpp:28
KOKKOS_FUNCTION void operator()(int qp) const
Definition calculate_QP_position.hpp:39
ConstView< double **[4]> qp_r_
Definition calculate_QP_position.hpp:36
ConstView< double **[3]> qp_u_
Definition calculate_QP_position.hpp:34
typename View< ValueType >::const_type ConstView
Definition calculate_QP_position.hpp:30
ConstView< double **[4]> qp_r0_
Definition calculate_QP_position.hpp:35