Class CSVMeshWriter

Class Documentation

class CSVMeshWriter

The CSVWriter class. Handles writing into CSV file format.

Public Functions

CSVMeshWriter(const std::string &filename, char delim = kernel::utilities::CSVWriter::default_delimiter(), bool open_file = false, const std::ios_base::openmode mode = std::ios_base::out)

Constructor.

inline void write_column_names(const std::vector<std::string> &col_names, bool write_header = true)

Write the column names.

inline void write_column_names(const std::vector<std::string_view> &col_names, bool write_header = true)

Write the column names.

inline void write_column_names(const std::initializer_list<std::string_view> &col_names, bool write_header = true)

Write the column names.

template<typename T>
void write_row(const std::vector<T> &vals)

Write a row of the file.

template<typename T>
void write_row(const DynVec<T> &vals)

Write the given Vec as a row.

template<typename ...T>
void write_row(const std::tuple<T...> &row)

Write the given tuple as a row.

inline void set_delimiter(char delim) noexcept

Set the delimiter.

inline char get_delimiter() const noexcept

Returns the column delimiter.

inline bool is_open() const

Returns true if the file is open.

void write_mesh(const numerics::LineMesh<2> &mesh)

Write the given LineMesh into csv format.

template<typename MeshTp>
void write_mesh_nodes(const MeshTp &mesh)

Write the nodes of the given Mesh.

Public Static Functions

static inline char default_delimiter()

The default column delimiter.