Outputs Class Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Loading...
Searching...
No Matches
kynema::interfaces::Outputs Class Reference
A class that handles writing state data to disk for analysis/visualization. More...
#include <outputs.hpp>
Public Types | |
enum class | OutputLocation : std::uint8_t { kNodes = 0 , kQPs = 1 } |
Enum for selecting where on elements to write the outputs. More... | |
using | DeviceType = Kokkos::Device< Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space > |
Public Member Functions | |
Outputs (const std::string &output_file, size_t num_nodes, OutputLocation location=OutputLocation::kNodes) | |
Constructor taking an output file and location. | |
Outputs (const std::string &output_file, const std::string &time_series_file, size_t num_nodes, OutputLocation location=OutputLocation::kNodes) | |
Constructor taking an output file, time-series file, and location. | |
std::unique_ptr< util::NodeStateWriter > & | GetOutputWriter () |
Gets a reference to the NodeStateWriter for direct usage. | |
std::unique_ptr< util::TimeSeriesWriter > & | GetTimeSeriesWriter () |
Gets a reference to the TimeSeriesWriter for direct usage. | |
OutputLocation | GetLocation () const |
Returns the output location as set by the constructor. | |
void | WriteNodeOutputsAtTimestep (const HostState< DeviceType > &host_state, size_t timestep) |
Write node state outputs to NetCDF file at specified timestep. | |
void | WriteRotorTimeSeriesAtTimestep (size_t timestep, double azimuth_angle, double rotor_speed) |
Write rotor time-series data at specified timestep. | |
Detailed Description
A class that handles writing state data to disk for analysis/visualization.
Member Typedef Documentation
◆ DeviceType
using kynema::interfaces::Outputs::DeviceType = Kokkos::Device<Kokkos::DefaultExecutionSpace, Kokkos::DefaultExecutionSpace::memory_space> |
Member Enumeration Documentation
◆ OutputLocation
|
strong |
Constructor & Destructor Documentation
◆ Outputs() [1/2]
kynema::interfaces::Outputs::Outputs | ( | const std::string & | output_file, |
size_t | num_nodes, | ||
OutputLocation | location = OutputLocation::kNodes |
||
) |
Constructor taking an output file and location.
- Parameters
-
output_file The name of the output file num_nodes the number of nodes to be written to the file location where the output will be written (quadrature points vs nodes)
◆ Outputs() [2/2]
kynema::interfaces::Outputs::Outputs | ( | const std::string & | output_file, |
const std::string & | time_series_file, | ||
size_t | num_nodes, | ||
OutputLocation | location = OutputLocation::kNodes |
||
) |
Constructor taking an output file, time-series file, and location.
- Parameters
-
output_file The name of the output file time_series_file The name of the file with time-series data num_nodes the number of nodes to be written to the file location where the output will be written (quadrature points vs nodes)
Member Function Documentation
◆ GetLocation()
Outputs::OutputLocation kynema::interfaces::Outputs::GetLocation | ( | ) | const |
Returns the output location as set by the constructor.
- Returns
- the OutputLocation
◆ GetOutputWriter()
std::unique_ptr< util::NodeStateWriter > & kynema::interfaces::Outputs::GetOutputWriter | ( | ) |
Gets a reference to the NodeStateWriter for direct usage.
- Returns
- A reference to the NodeStateWriter
◆ GetTimeSeriesWriter()
std::unique_ptr< util::TimeSeriesWriter > & kynema::interfaces::Outputs::GetTimeSeriesWriter | ( | ) |
Gets a reference to the TimeSeriesWriter for direct usage.
- Returns
- A reference to the TimeSeriesWriter
◆ WriteNodeOutputsAtTimestep()
void kynema::interfaces::Outputs::WriteNodeOutputsAtTimestep | ( | const HostState< DeviceType > & | host_state, |
size_t | timestep | ||
) |
Write node state outputs to NetCDF file at specified timestep.
- Parameters
-
host_state an updated host_state object with the current state loaded timestep The timestep number to write data to
◆ WriteRotorTimeSeriesAtTimestep()
void kynema::interfaces::Outputs::WriteRotorTimeSeriesAtTimestep | ( | size_t | timestep, |
double | azimuth_angle, | ||
double | rotor_speed | ||
) |
Write rotor time-series data at specified timestep.
- Parameters
-
timestep The timestep number to write data to azimuth_angle The current azimuth angle rotor_speed The current rotor speed
The documentation for this class was generated from the following files:
- /home/runner/work/kynema/kynema/kynema/src/interfaces/outputs.hpp
- /home/runner/work/kynema/kynema/kynema/src/interfaces/outputs.cpp
Generated by