6#include <vtkSmartPointer.h>
7#include <vtkUnstructuredGrid.h>
8#include <vtkXMLWriter.h>
21 std::string
const& file_name);
34 int dataMode = vtkXMLWriter::Appended,
35 bool compress =
false);
40 std::string
const& file_name,
41 bool const compute_element_neighbors =
false);
43 static vtkSmartPointer<vtkUnstructuredGrid>
50 std::string
const& file_name,
51 bool const compute_element_neighbors =
false);
55 bool writeToFile(std::filesystem::path
const& file_path);
62 template <
typename UnstructuredGr
idWriter>
63 bool writeVTU(std::string
const& file_name,
const int num_partitions = 1,
73 int const data_mode = vtkXMLWriter::Appended);
VtuInterface(const MeshLib::Mesh *mesh, int dataMode=vtkXMLWriter::Appended, bool compress=false)
Provide the mesh to write and set if compression should be used.
static MeshLib::Mesh * readVTUFile(std::string const &file_name, bool const compute_element_neighbors=false)
static MeshLib::Mesh * readVTKFile(std::string const &file_name, bool const compute_element_neighbors=false)
static vtkSmartPointer< vtkUnstructuredGrid > readVtuFileToVtkUnstructuredGrid(std::string const &file_name)
bool writeVTU(std::string const &file_name, const int num_partitions=1, const int rank=1)
bool writeToFile(std::filesystem::path const &file_path)
const MeshLib::Mesh * _mesh
int writeVtu(MeshLib::Mesh const &mesh, std::string const &file_name, int const data_mode)
std::string getVtuFileNameForPetscOutputWithoutExtension(std::string const &file_name)