28 oss <<
"NumberOfPoints=\"" << mesh.
nVertices() <<
"\" ";
29 oss <<
"NumberOfLines=\"" << mesh.
edges().
size() <<
"\" ";
37 out <<
" <PDataArray type=\"Int32\" Name=\"connectivity\" NumberOfComponents=\"1\"/>\n";
38 out <<
" <PDataArray type=\"Int32\" Name=\"offsets\" NumberOfComponents=\"1\"/>\n";
39 out <<
" </PLines>\n";
41 out <<
" <PDataArray type=\"Int32\" Name=\"connectivity\" NumberOfComponents=\"1\"/>\n";
42 out <<
" <PDataArray type=\"Int32\" Name=\"offsets\" NumberOfComponents=\"1\"/>\n";
43 out <<
" </PPolys>\n";
50 outFile <<
" <Lines>\n";
51 outFile <<
" <DataArray type=\"Int32\" Name=\"connectivity\" NumberOfComponents=\"1\" format=\"ascii\">\n";
57 outFile <<
" </DataArray> \n";
58 outFile <<
" <DataArray type=\"Int32\" Name=\"offsets\" NumberOfComponents=\"1\" format=\"ascii\">\n";
60 for (
size_t i = 1; i <= mesh.
edges().size(); i++) {
61 outFile << 2 * i <<
" ";
64 outFile <<
" </DataArray>\n";
65 outFile <<
" </Lines>\n";
66 outFile <<
" <Polys>\n";
67 outFile <<
" <DataArray type=\"Int32\" Name=\"connectivity\" NumberOfComponents=\"1\" format=\"ascii\">\n";
73 outFile <<
" </DataArray> \n";
74 outFile <<
" <DataArray type=\"Int32\" Name=\"offsets\" NumberOfComponents=\"1\" format=\"ascii\">\n";
76 for (
size_t i = 1; i <= mesh.
triangles().size(); i++) {
77 outFile << 3 * i <<
" ";
80 outFile <<
" </DataArray>\n";
81 outFile <<
" </Polys>\n";
std::string getVTKFormat() const override
std::string getPieceAttributes(const mesh::Mesh &mesh) const override
void exportConnectivity(std::ostream &outFile, const mesh::Mesh &mesh) const override
void writeParallelCells(std::ostream &out) const override
std::string getPieceExtension() const override
std::string getParallelExtension() const override
static void writeLine(const mesh::Edge &edge, std::ostream &outFile)
static void writeTriangle(const mesh::Triangle &triangle, std::ostream &outFile)
Linear edge of a mesh, defined by two Vertex objects.
Container and creator for meshes.
std::size_t nVertices() const
Returns the number of vertices.
TriangleContainer & triangles()
Returns modifiable container holding all triangles.
EdgeContainer & edges()
Returns modifiable container holding all edges.
Triangle of a mesh, defined by three vertices.
provides Import and Export of the coupling mesh and data.