/home/runner/work/kynema/kynema/kynema/src/solver/contribute_forces_to_vector.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/solver/contribute_forces_to_vector.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
contribute_forces_to_vector.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Kokkos_Core.hpp>
4
6
7namespace kynema::solver {
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
25
27 void operator()(size_t node) const {
29 const auto dof_index = node_freedom_map_table(node);
31 return;
33 vector(dof_index + 0, 0) -= node_loads(node, 0);
34 vector(dof_index + 1, 0) -= node_loads(node, 1);
35 vector(dof_index + 2, 0) -= node_loads(node, 2);
36 vector(dof_index + 3, 0) -= node_loads(node, 3);
37 vector(dof_index + 4, 0) -= node_loads(node, 4);
38 vector(dof_index + 5, 0) -= node_loads(node, 5);
40 vector(dof_index + 0, 0) -= node_loads(node, 0);
41 vector(dof_index + 1, 0) -= node_loads(node, 1);
42 vector(dof_index + 2, 0) -= node_loads(node, 2);
44 vector(dof_index + 0, 0) -= node_loads(node, 3);
45 vector(dof_index + 1, 0) -= node_loads(node, 4);
46 vector(dof_index + 2, 0) -= node_loads(node, 5);
47 }
48 }
49};
50
51} // namespace kynema::solver
Definition calculate_error_sum_squares.hpp:5
A Kernel which sums the nodal forces into the global RHS vector.
Definition contribute_forces_to_vector.hpp:13
LeftView< double *[1]> vector
Definition contribute_forces_to_vector.hpp:24
Kokkos::View< ValueType, Kokkos::LayoutLeft, DeviceType > LeftView
Definition contribute_forces_to_vector.hpp:19
KOKKOS_FUNCTION void operator()(size_t node) const
Definition contribute_forces_to_vector.hpp:27
typename View< ValueType >::const_type ConstView
Definition contribute_forces_to_vector.hpp:17
ConstView< dof::FreedomSignature * > node_freedom_allocation_table
Definition contribute_forces_to_vector.hpp:21
ConstView< double ** > node_loads
Definition contribute_forces_to_vector.hpp:23
Kokkos::View< ValueType, DeviceType > View
Definition contribute_forces_to_vector.hpp:15
ConstView< size_t * > node_freedom_map_table
Definition contribute_forces_to_vector.hpp:22