HostConstraints< DeviceType > Struct Template Reference

Kynema API: kynema::interfaces::HostConstraints< DeviceType > Struct Template Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
kynema::interfaces::HostConstraints< DeviceType > Struct Template Reference

Host-side mirror of the constraint input, output, and loads for a given time increment. More...

#include <host_constraints.hpp>

Public Types

template<typename ValueType >
using HostView = typename Kokkos::View< ValueType, DeviceType >::HostMirror
 

Public Member Functions

 HostConstraints (const Constraints< DeviceType > &constraints)
 Construct host state from state.
 
void CopyFromConstraints (const Constraints< DeviceType > &constraints)
 Copy state data to host state.
 
void CopyInputsToConstraints (Constraints< DeviceType > &constraints) const
 Set inputs in constraints from host constraints.
 

Public Attributes

HostView< double *[7]> input
 Host local copy of current inputs.
 
HostView< double *[3]> output
 Host local copy of current outputs.
 
HostView< double *[6]> loads
 Host local copy of current loads.
 

Detailed Description

template<typename DeviceType>
struct kynema::interfaces::HostConstraints< DeviceType >

Host-side mirror of the constraint input, output, and loads for a given time increment.

This struct maintains host-local copies of the key constraint values used for the dynamic simulation, including:

  • Input: Control inputs for the constraints [x, y, z, qw, qx, qy, qz] -> 7 x 1
  • Output: Output values depending on constraint [δx, δy, δz, δqw, δqx, δqy, δqz] -> 7 x 1
  • Loads: Constraint loads (Lambda) [fx, fy, fz, mx, my, mz] -> 6 x 1
Note
This struct serves as a host-side mirror of the constraint data, 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::HostConstraints< DeviceType >::HostView = typename Kokkos::View<ValueType, DeviceType>::HostMirror

Constructor & Destructor Documentation

◆ HostConstraints()

template<typename DeviceType >
kynema::interfaces::HostConstraints< DeviceType >::HostConstraints ( const Constraints< DeviceType > &  constraints)
inlineexplicit

Construct host state from state.

Member Function Documentation

◆ CopyFromConstraints()

template<typename DeviceType >
void kynema::interfaces::HostConstraints< DeviceType >::CopyFromConstraints ( const Constraints< DeviceType > &  constraints)
inline

Copy state data to host state.

◆ CopyInputsToConstraints()

template<typename DeviceType >
void kynema::interfaces::HostConstraints< DeviceType >::CopyInputsToConstraints ( Constraints< DeviceType > &  constraints) const
inline

Set inputs in constraints from host constraints.

Parameters
constraintsconstraints to update

Member Data Documentation

◆ input

template<typename DeviceType >
HostView<double* [7]> kynema::interfaces::HostConstraints< DeviceType >::input

Host local copy of current inputs.

◆ loads

template<typename DeviceType >
HostView<double* [6]> kynema::interfaces::HostConstraints< DeviceType >::loads

Host local copy of current loads.

◆ output

template<typename DeviceType >
HostView<double* [3]> kynema::interfaces::HostConstraints< DeviceType >::output

Host local copy of current outputs.


The documentation for this struct was generated from the following files: