17#include <vtkSmartPointer.h>
18#include <vtkUnstructuredGrid.h>
19#include <vtkXMLWriter.h>
32 std::string
const& file_name);
45 int dataMode = vtkXMLWriter::Appended,
46 bool compress =
false);
51 std::string
const& file_name,
52 bool const compute_element_neighbors =
false);
54 static vtkSmartPointer<vtkUnstructuredGrid>
61 std::string
const& file_name,
62 bool const compute_element_neighbors =
false);
66 bool writeToFile(std::filesystem::path
const& file_path);
73 template <
typename UnstructuredGr
idWriter>
74 bool writeVTU(std::string
const& file_name,
const int num_partitions = 1,
84 int const data_mode = vtkXMLWriter::Appended);
Implementation of the VtuInterface class.
Reads and writes VtkXMLUnstructuredGrid-files (vtu) to and from OGS data structures....
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)