Writes output in Comma-Separated Value format. More...
#include <Csv.hpp>
Public Member Functions | |
| Csv (std::string name, std::vector< std::string > columns) | |
Creates a Csv with named columns. | |
| Csv (std::string name, int n_columns) | |
Creates a Csv with unnamed columns. | |
| void | write (Array< double > data) |
| Writes some data to the CSV. | |
| void | write_block (Array< double > pos, Array< double > vars) override |
| Accepts physical mesh data and writes only the node values. | |
| void | write_unstruct (Array< int > elements, Array< double > pos, Array< double > vars) override |
| Accepts physical mesh data and writes only the node values. | |
Additional Inherited Members | |
Public Types inherited from hexed::Visualizer | |
| enum | elem_type { block , simplex } |
enum used to indicate the type of elements to visualize More... | |
Static Public Member Functions inherited from hexed::Visualizer | |
| static std::unique_ptr< Visualizer > | create (std::string format, int n_dim_geom, int n_dim_topo, std::string file_name, std::vector< std::string > variable_names, double time, elem_type element_type) |
Creates a Visualizer object, selecting the appropriate backend based on the requested file format. | |
| static std::unique_ptr< Visualizer > | create (std::string format, int n_dim_geom, int n_dim_topo, std::string file_name, const Output_data &, double time, elem_type) |
overload of create(std::string, int, int, std::string, std::vector<std::string>, double, elem_type) | |
Static Public Attributes inherited from hexed::Visualizer | |
| static const std::string | default_format |
| Default file format to visualize in, depending on what libraries you have enabled. | |
Writes output in Comma-Separated Value format.
File will be open as long as this object exists. If the file already exists, it will be overwritten.
| hexed::Csv::Csv | ( | std::string | name, |
| std::vector< std::string > | columns ) |
Creates a Csv with named columns.
The resulting CSV file will begin with a line with column names.
| hexed::Csv::Csv | ( | std::string | name, |
| int | n_columns ) |
Creates a Csv with unnamed columns.
The resulting CSV file will not include a header line, but simply start with the first row of values.
| void hexed::Csv::write | ( | Array< double > | data | ) |
Writes some data to the CSV.
data.cols() must be the same as the number of columns in this file. The number of rows is arbitrary. If you have already written some data to this file with previous calls to write (but with this same Csv instance), the new data will be appended.