6#include <vtkSmartPointer.h>
7#include <vtkUnstructuredGrid.h>
8#include <vtkXMLWriter.h>
23 std::string
const& file_name);
37 std::set<std::string>
const& output_variable_names = {},
38 int dataMode = vtkXMLWriter::Appended,
39 bool compress =
false);
44 std::string
const& file_name,
45 bool const compute_element_neighbors =
false);
47 static vtkSmartPointer<vtkUnstructuredGrid>
54 std::string
const& file_name,
55 bool const compute_element_neighbors =
false);
59 bool writeToFile(std::filesystem::path
const& file_path);
66 template <
typename UnstructuredGr
idWriter>
67 bool writeVTU(std::string
const& file_name,
const int num_partitions = 1,
std::set< std::string > _output_variable_names
VtuInterface(const MeshLib::Mesh *mesh, std::set< std::string > const &output_variable_names={}, 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
std::string getVtuFileNameForPetscOutputWithoutExtension(std::string const &file_name)