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

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