diff --git a/cpp/dolfinx/io/VTKHDF.h b/cpp/dolfinx/io/VTKHDF.h index 40bb78ad3a..66c35d152e 100644 --- a/cpp/dolfinx/io/VTKHDF.h +++ b/cpp/dolfinx/io/VTKHDF.h @@ -25,7 +25,8 @@ namespace dolfinx::io::VTKHDF /// @param filename Name of file to write to. /// @param mesh Mesh to write to file. template -void write_mesh(std::string filename, const mesh::Mesh& mesh) +void write_mesh(const std::filesystem::path& filename, + const mesh::Mesh& mesh) { hid_t h5file = hdf5::open_file(mesh.comm(), filename, "w", true); @@ -171,7 +172,8 @@ void write_mesh(std::string filename, const mesh::Mesh& mesh) /// @note Limited support for floating point types at present (no /// complex number support). template -void write_data(std::string point_or_cell, std::string filename, +void write_data(std::string point_or_cell, + const std::filesystem::path& filename, const mesh::Mesh& mesh, const std::vector& data, double time) { @@ -310,7 +312,7 @@ void write_data(std::string point_or_cell, std::string filename, /// facet can be connected to. /// @return The mesh read from file. template -mesh::Mesh read_mesh(MPI_Comm comm, std::string filename, +mesh::Mesh read_mesh(MPI_Comm comm, const std::filesystem::path& filename, std::size_t gdim = 3, std::optional max_facet_to_cell_links = 2) {