Molecular Dynamics  v0.4
Project for the Practical hosted by the Scientific Computing Chair
CSVWriter.h
Go to the documentation of this file.
1 //
2 // Created by daniel on 30.06.24.
3 //
4 
5 #pragma once
6 #include <fstream>
7 #include <vector>
8 
12 class CSVWriter {
13 private:
14  std::ofstream file;
16 
17 public:
23  CSVWriter(int numberOfBins, std::string filename);
24 
28  ~CSVWriter();
29 
37  int writeProfile(std::vector<double>& velocities, double time);
38 
39 };
Definition: CSVWriter.h:12
int numberOfBins
Definition: CSVWriter.h:15
int writeProfile(std::vector< double > &velocities, double time)
Write one data set of a velocity profile to a csv file.
Definition: CSVWriter.cpp:46
~CSVWriter()
When this object is destructed, the csv file is closed.
Definition: CSVWriter.cpp:42
std::ofstream file
Definition: CSVWriter.h:14
CSVWriter(int numberOfBins, std::string filename)
Construct new CSVWriter. A csv file is opened ones and closed, when this class is destructed.
Definition: CSVWriter.cpp:10
::xsd::cxx::tree::time< char, simple_type > time
C++ type corresponding to the time XML Schema built-in type.
Definition: vtk-unstructured.h:438
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-unstructured.h:270