/home/runner/work/kynema/kynema/kynema/src/step/update_system_variables_springs.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/step/update_system_variables_springs.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
update_system_variables_springs.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Kokkos_Core.hpp>
4#include <Kokkos_Profiling_ScopedRegion.hpp>
5
7#include "state/state.hpp"
9
10namespace kynema::step {
11
12template <typename DeviceType>
14 const Springs<DeviceType>& springs, State<DeviceType>& state
15) {
16 auto region = Kokkos::Profiling::ScopedRegion("Update System Variables Springs");
17
18 using RangePolicy = Kokkos::RangePolicy<typename DeviceType::execution_space>;
19 auto range_policy = RangePolicy(0, springs.num_elems);
20
21 Kokkos::parallel_for(
22 "Calculate System Variables Springs", range_policy,
24 state.q, springs.node_state_indices, springs.x0, springs.l_ref, springs.k,
26 }
27 );
28}
29
30} // namespace kynema::step
Definition assemble_constraints_matrix.hpp:11
void UpdateSystemVariablesSprings(const Springs< DeviceType > &springs, State< DeviceType > &state)
Definition update_system_variables_springs.hpp:13
Contains field variables for spring elements to compute per-element contributions to the residual vec...
Definition springs.hpp:14
size_t num_elems
Definition springs.hpp:18
View< double * > l_ref
Definition springs.hpp:26
View< size_t *[2]> node_state_indices
Definition springs.hpp:21
View< double * > k
Definition springs.hpp:27
View< double *[2][3]> residual_vector_terms
Definition springs.hpp:29
View< double *[3]> x0
Definition springs.hpp:25
View< double *[2][2][3][3]> stiffness_matrix_terms
Definition springs.hpp:30
Container for storing the complete system state of the simulation at a given time increment.
Definition state.hpp:18
View< double *[7]> q
Definition state.hpp:33
Definition calculate_quadrature_point_values.hpp:14