26 #ifndef MERCURYDPM_VTKDATA_H
27 #define MERCURYDPM_VTKDATA_H
33 #include <unordered_map>
74 std::unordered_map<std::string, std::vector<Mdouble>>
getPointData()
const;
91 void reservePoints(
unsigned int n,
const std::vector<std::string>& keys = {});
105 void writeVTKDataFromVtkContainer(std::string fileName,
const std::vector<Vec3D>& points,
const std::vector<std::vector<double>>& triangleStrips);
123 std::unordered_map<std::string, std::vector<Mdouble>>
pointData_;
const unsigned n
Definition: CG3DPackingUnitTest.cpp:32
Definition: Kernel/VTKWriter/VTKData.h:36
void addToTypes(int type)
Adds a type to the types vector.
Definition: VTKData.cc:43
void writeVTKDataFromVtkContainer(std::string fileName, const std::vector< Vec3D > &points, const std::vector< std::vector< double >> &triangleStrips)
Definition: VTKData.cc:105
void writeVTKData(std::string fileName) const
Writes the data to a file with the given file name.
Definition: VTKData.cc:83
void writePoints(std::fstream &file) const
Definition: VTKData.cc:138
void writeConnectivity(std::fstream &file) const
Definition: VTKData.cc:181
void addToPoints(Vec3D point)
Adds a point to the points vector.
Definition: VTKData.cc:28
void writePointData(std::fstream &file) const
Definition: VTKData.cc:152
std::vector< std::vector< size_t > > connectivity_
Definition: Kernel/VTKWriter/VTKData.h:128
std::vector< int > getTypes() const
Definition: VTKData.cc:63
std::vector< Vec3D > points_
Definition: Kernel/VTKWriter/VTKData.h:118
std::unordered_map< std::string, std::vector< Mdouble > > getPointData() const
Definition: VTKData.cc:53
void writeOffsets(std::fstream &file) const
Definition: VTKData.cc:198
void reserveCells(unsigned int n)
Reserves additional memory for connectivity and types vectors.
Definition: VTKData.cc:76
std::fstream makeVTKFileWithHeader(std::string &fileName) const
Definition: VTKData.cc:120
void addToPointData(const std::string &key, Mdouble value)
Adds a value to the pointData values vector corresponding to the given key.
Definition: VTKData.cc:33
std::vector< int > types_
Definition: Kernel/VTKWriter/VTKData.h:133
std::vector< std::vector< size_t > > getConnectivity() const
Definition: VTKData.cc:58
void reservePoints(unsigned int n, const std::vector< std::string > &keys={})
Reserves additional memory for the points vector and optionally for the values vectors of the pointDa...
Definition: VTKData.cc:68
void writeTypes(std::fstream &file) const
Definition: VTKData.cc:212
std::vector< Vec3D > getPoints() const
Definition: VTKData.cc:48
std::unordered_map< std::string, std::vector< Mdouble > > pointData_
Definition: Kernel/VTKWriter/VTKData.h:123
void addToConnectivity(const std::vector< size_t > &indices)
Adds a vector of indices to the connectivity vector.
Definition: VTKData.cc:38