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

Kynema API: /home/runner/work/kynema/kynema/kynema/src/system/beams/calculate_D_D1.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
calculate_D_D1.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <KokkosBatched_Gemm_Decl.hpp>
4#include <KokkosBlas.hpp>
5#include <KokkosBlas1_set.hpp>
6#include <Kokkos_Core.hpp>
7
9
10namespace kynema::beams {
11
12template <typename DeviceType>
14 template <typename ValueType>
15 using View = Kokkos::View<ValueType, DeviceType>;
16 template <typename ValueType>
18
20 const ConstView<double[3]>& omega, const ConstView<double[6][6]>& D,
21 const View<double[6][6]>& D_D1
22 ) {
23 using NoTranspose = KokkosBatched::Trans::NoTranspose;
24 using Default = KokkosBatched::Algo::Gemm::Default;
25 using GemmNN = KokkosBatched::SerialGemm<NoTranspose, NoTranspose, Default>;
26 using Kokkos::make_pair;
27 using Kokkos::subview;
28
29 KokkosBlas::SerialSet::invoke(0., D_D1);
30
31 auto tilde_omega_data = Kokkos::Array<double, 9>{};
34
35 auto D12 = subview(D, make_pair(0, 3), make_pair(3, 6));
36 auto D_D1_12 = subview(D_D1, make_pair(0, 3), make_pair(3, 6));
37 GemmNN::invoke(1., D12, tilde_omega, 0., D_D1_12);
38
39 auto D22 = subview(D, make_pair(3, 6), make_pair(3, 6));
40 auto D_D1_22 = subview(D_D1, make_pair(3, 6), make_pair(3, 6));
41 GemmNN::invoke(1., D22, tilde_omega, 0., D_D1_22);
42 }
43};
44} // namespace kynema::beams
Definition beam_quadrature.hpp:14
KOKKOS_INLINE_FUNCTION void VecTilde(const VectorType &vector, const MatrixType &matrix)
Converts a 3x1 vector to a 3x3 skew-symmetric matrix and returns the result.
Definition vector_operations.hpp:10
Definition calculate_D_D1.hpp:13
Kokkos::View< ValueType, DeviceType > View
Definition calculate_D_D1.hpp:15
static KOKKOS_FUNCTION void invoke(const ConstView< double[3]> &omega, const ConstView< double[6][6]> &D, const View< double[6][6]> &D_D1)
Definition calculate_D_D1.hpp:19
typename View< ValueType >::const_type ConstView
Definition calculate_D_D1.hpp:17