Skip to content

Commit

Permalink
export vtm too
Browse files Browse the repository at this point in the history
  • Loading branch information
teseoch committed Dec 13, 2024
1 parent 22a3802 commit f710d78
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/wmtk/io/ParaviewWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
#include <wmtk/utils/Logger.hpp>
#include <wmtk/utils/Rational.hpp>

#include <paraviewo/VTMWriter.hpp>
#include <paraviewo/VTUWriter.hpp>

// #include <paraviewo/HDF5VTUWriter.hpp>

#include <sstream>
Expand Down Expand Up @@ -147,6 +149,14 @@ ParaviewWriter::ParaviewWriter(
m_writers[1].init(filename.string() + "_edges.vtu", vertices_name, cells[1], m_enabled[1]);
m_writers[2].init(filename.string() + "_faces.vtu", vertices_name, cells[2], m_enabled[2]);
m_writers[3].init(filename.string() + "_tets.vtu", vertices_name, cells[3], m_enabled[3]);

paraviewo::VTMWriter vtm;
if (m_enabled[0]) vtm.add_dataset("verts", "mesh", filename.string() + "_verts.vtu");
if (m_enabled[1]) vtm.add_dataset("edges", "mesh", filename.string() + "_edges.vtu");
if (m_enabled[2]) vtm.add_dataset("faces", "mesh", filename.string() + "_faces.vtu");
if (m_enabled[3]) vtm.add_dataset("tets", "mesh", filename.string() + "_tets.vtu");

vtm.save(filename.string() + ".vtm");
}

void ParaviewWriter::write(
Expand Down

0 comments on commit f710d78

Please sign in to comment.