HostState< DeviceType > Struct Template Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Loading...
Searching...
No Matches
kynema::interfaces::HostState< DeviceType > Struct Template Reference
Host-side mirror of the simulation state for a given time increment. More...
#include <host_state.hpp>
Public Types | |
template<typename ValueType > | |
using | HostView = typename Kokkos::View< ValueType, DeviceType >::HostMirror |
Public Member Functions | |
HostState (const State< DeviceType > &state) | |
Construct host state from state. | |
void | CopyFromState (const State< DeviceType > &state) const |
Copy state data to host state. | |
Public Attributes | |
HostView< double *[7]> | x |
Host local copy of current position. | |
HostView< double *[7]> | q |
Host local copy of current displacement. | |
HostView< double *[6]> | v |
Host local copy of current velocity. | |
HostView< double *[6]> | vd |
Host local copy of current acceleration. | |
HostView< double *[6]> | f |
Host local copy of external forces. | |
Detailed Description
template<typename DeviceType>
struct kynema::interfaces::HostState< DeviceType >
struct kynema::interfaces::HostState< DeviceType >
Host-side mirror of the simulation state for a given time increment.
This struct maintains host-local copies of the key state variables required for the dynamic simulation, including:
- Position: Current position and orientation [x, y, z, qw, qx, qy, qz] -> 7 x 1
- Displacement: Current displacement and rotation [δx, δy, δz, δqw, δqx, δqy, δqz] -> 7 x 1
- Velocity: Current linear and angular velocities [vx, vy, vz, wx, wy, wz] -> 6 x 1
- Acceleration: Current linear and angular accelerations [ax, ay, az, αx, αy, αz] -> 6 x 1
- Note
- This struct serves as a host-side mirror of the device state, allowing for efficient data transfer between device and host memory. It's primarily used for the interfaces, I/O operations etc.
Member Typedef Documentation
◆ HostView
template<typename DeviceType >
template<typename ValueType >
using kynema::interfaces::HostState< DeviceType >::HostView = typename Kokkos::View<ValueType, DeviceType>::HostMirror |
Constructor & Destructor Documentation
◆ HostState()
template<typename DeviceType >
|
inlineexplicit |
Construct host state from state.
Member Function Documentation
◆ CopyFromState()
template<typename DeviceType >
|
inline |
Copy state data to host state.
Member Data Documentation
◆ f
template<typename DeviceType >
HostView<double* [6]> kynema::interfaces::HostState< DeviceType >::f |
Host local copy of external forces.
◆ q
template<typename DeviceType >
HostView<double* [7]> kynema::interfaces::HostState< DeviceType >::q |
Host local copy of current displacement.
◆ v
template<typename DeviceType >
HostView<double* [6]> kynema::interfaces::HostState< DeviceType >::v |
Host local copy of current velocity.
◆ vd
template<typename DeviceType >
HostView<double* [6]> kynema::interfaces::HostState< DeviceType >::vd |
Host local copy of current acceleration.
◆ x
template<typename DeviceType >
HostView<double* [7]> kynema::interfaces::HostState< DeviceType >::x |
Host local copy of current position.
The documentation for this struct was generated from the following file:
- /home/runner/work/kynema/kynema/kynema/src/interfaces/host_state.hpp
Generated by