OpenMPCD
Graph4D.cpp
1 #include <OpenMPCD/Graph4D.hpp>
2 
3 #include <fstream>
4 #include <limits>
5 
6 void OpenMPCD::Graph4D::save(const std::string& path) const
7 {
8  std::ofstream file(path.c_str(), std::ios::trunc);
9  file.precision(std::numeric_limits<FP>::digits10 + 2);
10 
11  for(Container::size_type i=0; i<points.size(); ++i)
12  file<<points[i].get<0>()<<"\t"<<points[i].get<1>()<<"\t"<<points[i].get<2>()<<"\t"<<points[i].get<3>()<<"\n";
13 }
Graph4D.hpp
OpenMPCD::Graph4D::save
void save(const std::string &path) const
Saves the graph data to the given file path.
Definition: Graph4D.cpp:6