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

Kynema API: /home/runner/work/kynema/kynema/kynema/src/system/beams/calculate_force_FD.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
calculate_force_FD.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
16 const ConstView<double[3][3]>& x0pupSS, const ConstView<double[6]>& FC,
17 const View<double[6]>& FD
18 ) {
19 using Transpose = KokkosBlas::Trans::Transpose;
20 using Default = KokkosBlas::Algo::Gemv::Default;
21 using Gemv = KokkosBlas::SerialGemv<Transpose, Default>;
22 using Kokkos::make_pair;
23 using Kokkos::subview;
24
25 for (auto component = 0U; component < 6U; ++component) {
26 FD(component) = 0.;
27 }
28 Gemv::invoke(1., x0pupSS, subview(FC, make_pair(0, 3)), 0., subview(FD, make_pair(3, 6)));
29 }
30};
31} // namespace kynema::beams
Definition beam_quadrature.hpp:16
Definition calculate_force_FD.hpp:9
static KOKKOS_FUNCTION void invoke(const ConstView< double[3][3]> &x0pupSS, const ConstView< double[6]> &FC, const View< double[6]> &FD)
Definition calculate_force_FD.hpp:15
typename View< ValueType >::const_type ConstView
Definition calculate_force_FD.hpp:13
Kokkos::View< ValueType, DeviceType > View
Definition calculate_force_FD.hpp:11