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

Kynema API: /home/runner/work/kynema/kynema/kynema/src/step/update_system_variables_masses.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
update_system_variables_masses.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"
8#include "step_parameters.hpp"
10
11namespace kynema::step {
12
13template <typename DeviceType>
15 const StepParameters& parameters, const Masses<DeviceType>& masses, State<DeviceType>& state
16) {
17 auto region = Kokkos::Profiling::ScopedRegion("Update System Variables Masses");
18
19 using RangePolicy = Kokkos::RangePolicy<typename DeviceType::execution_space>;
20 auto range_policy = RangePolicy(0, masses.num_elems);
21
22 Kokkos::parallel_for(
23 "masses::CalculateQuadraturePointValues", range_policy,
25 parameters.beta_prime, parameters.gamma_prime, state.q, state.v, state.vd, state.tangent,
26 masses.state_indices, masses.gravity, masses.qp_Mstar, masses.node_x0,
28 }
29 );
30}
31
32} // namespace kynema::step
Definition assemble_constraints_matrix.hpp:11
void UpdateSystemVariablesMasses(const StepParameters &parameters, const Masses< DeviceType > &masses, State< DeviceType > &state)
Definition update_system_variables_masses.hpp:14
Contains field variables for mass elements (aka, rigid bodies) to compute per-element contributions t...
Definition masses.hpp:17
View< double *[7]> node_x0
Definition masses.hpp:27
View< double *[6][6]> qp_Mstar
Definition masses.hpp:28
View< size_t * > state_indices
Definition masses.hpp:23
View< double *[6]> residual_vector_terms
Definition masses.hpp:29
size_t num_elems
Definition masses.hpp:21
View< double[3]> gravity
Definition masses.hpp:26
View< double *[6][6]> system_matrix_terms
Definition masses.hpp:30
Container for storing the complete system state of the simulation at a given time increment.
Definition state.hpp:18
View< double *[6]> v
Definition state.hpp:34
View< double *[6][6]> tangent
Definition state.hpp:38
View< double *[7]> q
Definition state.hpp:33
View< double *[6]> vd
Definition state.hpp:35
A Struct containing the paramters used to control the time stepping process.
Definition step_parameters.hpp:12
double gamma_prime
Definition step_parameters.hpp:20
double beta_prime
Definition step_parameters.hpp:21
Definition calculate_quadrature_point_values.hpp:15