Tsunami Project Lab
Loading...
Searching...
No Matches
tsunami_lab::io::Csv Class Reference

#include <Csv.h>

Static Public Member Functions

static void write (t_real i_dxy, t_idx i_nx, t_idx i_ny, t_idx i_stride, t_real const *i_h, t_real const *i_hu, t_real const *i_hv, t_real const *i_bm, std::ostream &io_stream)
 
template<typename... Types>
static std::vector< std::tuple< Types... > > getRows (std::string filename, std::uint32_t skipLines, std::uint32_t maxRows=0)
 

Member Function Documentation

◆ getRows()

template<typename... Types>
static std::vector< std::tuple< Types... > > tsunami_lab::io::Csv::getRows ( std::string filename,
std::uint32_t skipLines,
std::uint32_t maxRows = 0 )
inlinestatic

◆ write()

void tsunami_lab::io::Csv::write ( t_real i_dxy,
t_idx i_nx,
t_idx i_ny,
t_idx i_stride,
t_real const * i_h,
t_real const * i_hu,
t_real const * i_hv,
t_real const * i_bm,
std::ostream & io_stream )
static

Writes the data as CSV to the given stream.

Parameters
i_dxycell width in x- and y-direction.
i_nxnumber of cells in x-direction.
i_nynumber of cells in y-direction.
i_stridestride of the data arrays in y-direction (x is assumed to be stride-1).
i_hwater height of the cells; optional: use nullptr if not required.
i_humomentum in x-direction of the cells; optional: use nullptr if not required.
i_hvmomentum in y-direction of the cells; optional: use nullptr if not required.
i_bmbathymetry of the cells; optional: use nullptr if not required.
io_streamstream to which the CSV-data is written.
Author
Alexander Breuer (alex.breuer AT uni-jena.de)

DESCRIPTION

IO-routines for writing a snapshot as Comma Separated Values (CSV).


The documentation for this class was generated from the following files: