/home/runner/work/kynema/kynema/kynema/src/interfaces/components/outputs_builder.hpp Source File

Kynema API: /home/runner/work/kynema/kynema/kynema/src/interfaces/components/outputs_builder.hpp Source File
Kynema API
A flexible multibody structural dynamics code for wind turbines
Loading...
Searching...
No Matches
outputs_builder.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "outputs_config.hpp"
4
6
20 OutputsBuilder& SetOutputFilePath(const std::string& output_file_path) {
21 config.output_file_path = output_file_path;
22 return *this;
23 }
24
31 OutputsBuilder& SetOutputStatePrefixes(const std::vector<std::string>& prefixes) {
32 config.output_state_prefixes = prefixes;
33 return *this;
34 }
35
42 OutputsBuilder& SetOutputBufferSize(std::size_t buffer_size) {
43 config.buffer_size = buffer_size;
44 return *this;
45 }
46
52 [[nodiscard]] OutputsConfig Config() const { return this->config; }
53
54private:
55 OutputsConfig config;
56};
57
58} // namespace kynema::interfaces::components
Definition aerodynamics.cpp:5
A builder class for building a outputs configuration.
Definition outputs_builder.hpp:10
OutputsBuilder & SetOutputStatePrefixes(const std::vector< std::string > &prefixes)
Sets the output state prefixes to be written to the output file.
Definition outputs_builder.hpp:31
OutputsConfig Config() const
Creates an OutputsConfig object based on the previously set parameters.
Definition outputs_builder.hpp:52
OutputsBuilder & SetOutputFilePath(const std::string &output_file_path)
Sets the output file path for NetCDF results.
Definition outputs_builder.hpp:20
OutputsBuilder & SetOutputBufferSize(std::size_t buffer_size)
Sets the number of output timesteps to buffer before flushing to disk.
Definition outputs_builder.hpp:42
A configuration object used to create the Outputs object.
Definition outputs_config.hpp:13
size_t buffer_size
Number of timesteps to buffer before auto-flush.
Definition outputs_config.hpp:21
std::vector< std::string > output_state_prefixes
Vector of state component prefixes to enable for writing.
Definition outputs_config.hpp:18
std::string output_file_path
Output file path for NetCDF results (empty = no outputs will be written)
Definition outputs_config.hpp:15