TimeSeriesWriter Class Reference
Kynema API
A flexible multibody structural dynamics code for wind turbines
|
Loading...
Searching...
No Matches
kynema::util::TimeSeriesWriter Class Reference
Class for writing time-series data to NetCDF file. More...
#include <time_series_writer.hpp>
Public Member Functions | |
TimeSeriesWriter (const std::string &file_path, bool create=true) | |
Constructor to create a TimeSeriesWriter object. | |
void | WriteValuesAtTimestep (const std::string &variable_name, size_t timestep, std::span< const double > values) |
Writes multiple values for a time-series variable at a specific timestep. | |
void | WriteValueAtTimestep (const std::string &variable_name, size_t timestep, const double &value) |
Writes a single value for a time-series variable at a specific timestep. | |
const NetCDFFile & | GetFile () const |
Get the NetCDF file object. | |
Detailed Description
Class for writing time-series data to NetCDF file.
Constructor & Destructor Documentation
◆ TimeSeriesWriter()
|
explicit |
Constructor to create a TimeSeriesWriter object.
- Parameters
-
file_path Path to the output NetCDF file create Whether to create a new file or open an existing one
Member Function Documentation
◆ GetFile()
const NetCDFFile & kynema::util::TimeSeriesWriter::GetFile | ( | ) | const |
Get the NetCDF file object.
◆ WriteValueAtTimestep()
void kynema::util::TimeSeriesWriter::WriteValueAtTimestep | ( | const std::string & | variable_name, |
size_t | timestep, | ||
const double & | value | ||
) |
Writes a single value for a time-series variable at a specific timestep.
- Parameters
-
variable_name Name of the variable to write timestep Current timestep index value Value to write at the current timestep
◆ WriteValuesAtTimestep()
void kynema::util::TimeSeriesWriter::WriteValuesAtTimestep | ( | const std::string & | variable_name, |
size_t | timestep, | ||
std::span< const double > | values | ||
) |
Writes multiple values for a time-series variable at a specific timestep.
- Parameters
-
variable_name Name of the variable to write timestep Current timestep index values Vector of values to write at the current timestep
The documentation for this class was generated from the following files:
- /home/runner/work/kynema/kynema/kynema/src/utilities/netcdf/time_series_writer.hpp
- /home/runner/work/kynema/kynema/kynema/src/utilities/netcdf/time_series_writer.cpp
Generated by