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

Kynema API: /home/runner/work/kynema/kynema/kynema/src/state/copy_state_data.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
copy_state_data.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "state.hpp"
4
5namespace kynema {
6
20template <typename DeviceType>
21inline void CopyStateData(State<DeviceType>& copy, const State<DeviceType>& old) {
22 using Kokkos::deep_copy;
23
24 copy.time_step = old.time_step;
25 deep_copy(copy.x, old.x);
26 deep_copy(copy.q_delta, old.q_delta);
27 deep_copy(copy.q_prev, old.q_prev);
28 deep_copy(copy.q, old.q);
29 deep_copy(copy.v, old.v);
30 deep_copy(copy.vd, old.vd);
31 deep_copy(copy.a, old.a);
32 deep_copy(copy.f, old.f);
33 deep_copy(copy.tangent, old.tangent);
34}
35
36} // namespace kynema
Definition calculate_constraint_output.hpp:8
void CopyStateData(State< DeviceType > &copy, const State< DeviceType > &old)
Performs a deep copy of the state data which might have changed in a given time step.
Definition copy_state_data.hpp:21
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]> a
Definition state.hpp:36
View< double *[7]> q_prev
Definition state.hpp:32
View< double *[7]> x
Definition state.hpp:30
View< double *[6][6]> tangent
Definition state.hpp:38
View< double *[6]> q_delta
Definition state.hpp:31
View< double *[7]> q
Definition state.hpp:33
View< double *[6]> vd
Definition state.hpp:35
size_t time_step
Definition state.hpp:22
View< double *[6]> f
Definition state.hpp:37