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

Kynema API: /home/runner/work/kynema/kynema/kynema/src/system/beams/calculate_Puu.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
calculate_Puu.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
8namespace kynema::beams {
9
10template <typename DeviceType>
12 template <typename ValueType>
13 using View = Kokkos::View<ValueType, DeviceType>;
14 template <typename ValueType>
16
18 const ConstView<double[6][6]>& Cuu, const ConstView<double[3][3]>& x0pupSS,
19 const ConstView<double[3][3]>& N_tilde, const View<double[6][6]>& Puu
20 ) {
21 using NoTranspose = KokkosBatched::Trans::NoTranspose;
22 using Transpose = KokkosBatched::Trans::Transpose;
23 using Default = KokkosBatched::Algo::Gemm::Default;
24 using GemmTN = KokkosBatched::SerialGemm<Transpose, NoTranspose, Default>;
25 using Kokkos::make_pair;
26 using Kokkos::subview;
27
28 auto C11 = subview(Cuu, make_pair(0, 3), make_pair(0, 3));
29 auto C12 = subview(Cuu, make_pair(0, 3), make_pair(3, 6));
30 KokkosBlas::SerialSet::invoke(0., Puu);
31 auto Puu_21 = subview(Puu, make_pair(3, 6), make_pair(0, 3));
32 KokkosBlas::serial_axpy(1., N_tilde, Puu_21);
33 GemmTN::invoke(1., x0pupSS, C11, 1., Puu_21);
34 auto Puu_22 = subview(Puu, make_pair(3, 6), make_pair(3, 6));
35 GemmTN::invoke(1., x0pupSS, C12, 0., Puu_22);
36 }
37};
38} // namespace kynema::beams
Definition beam_quadrature.hpp:16
Definition calculate_Puu.hpp:11
Kokkos::View< ValueType, DeviceType > View
Definition calculate_Puu.hpp:13
static KOKKOS_FUNCTION void invoke(const ConstView< double[6][6]> &Cuu, const ConstView< double[3][3]> &x0pupSS, const ConstView< double[3][3]> &N_tilde, const View< double[6][6]> &Puu)
Definition calculate_Puu.hpp:17
typename View< ValueType >::const_type ConstView
Definition calculate_Puu.hpp:15