/home/runner/work/kynema/kynema/kynema/src/state/update_static_prediction.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/state/update_static_prediction.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
update_static_prediction.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Kokkos_Core.hpp>
4
6
7namespace kynema::state {
8
12template <typename DeviceType>
14 template <typename ValueType>
15 using View = Kokkos::View<ValueType, DeviceType>;
16 template <typename ValueType>
18 template <typename ValueType>
19 using LeftView = Kokkos::View<ValueType, Kokkos::LayoutLeft, DeviceType>;
20 template <typename ValueType>
22
23 double h;
27 Kokkos::View<double* [6], DeviceType> q_delta;
28
30 void operator()(size_t node) const {
31 const auto num_dof = count_active_dofs(node_freedom_allocation_table(node));
32 const auto first_dof = node_freedom_map_table(node);
33 for (auto component = 0U; component < num_dof; ++component) {
34 const auto delta = x_delta(first_dof + component, 0);
35 q_delta(node, component) += delta / h;
36 }
37 }
38};
39
40} // namespace kynema::state
Definition calculate_displacement.hpp:7
A Kernel to update the change in state at a node for a static problem.
Definition update_static_prediction.hpp:13
KOKKOS_FUNCTION void operator()(size_t node) const
Definition update_static_prediction.hpp:30
double h
Definition update_static_prediction.hpp:23
Kokkos::View< ValueType, Kokkos::LayoutLeft, DeviceType > LeftView
Definition update_static_prediction.hpp:19
ConstLeftView< double *[1]> x_delta
Definition update_static_prediction.hpp:26
ConstView< size_t * > node_freedom_map_table
Definition update_static_prediction.hpp:25
typename View< ValueType >::const_type ConstView
Definition update_static_prediction.hpp:17
Kokkos::View< ValueType, DeviceType > View
Definition update_static_prediction.hpp:15
typename LeftView< ValueType >::const_type ConstLeftView
Definition update_static_prediction.hpp:21
Kokkos::View< double *[6], DeviceType > q_delta
Definition update_static_prediction.hpp:27
ConstView< dof::FreedomSignature * > node_freedom_allocation_table
Definition update_static_prediction.hpp:24