Wildmeshing Toolkit
Loading...
Searching...
No Matches
read_mesh.hpp
Go to the documentation of this file.
1#pragma once
2#include <filesystem>
3#include <memory>
4#include <vector>
5
6namespace wmtk {
7class Mesh;
8}
9namespace wmtk::io {
10
11enum class FileType { Auto, Msh, HDF5 };
12
13namespace utils {
14FileType guess_file_type(const std::string_view& file_name);
15// expects things like ".msh" or ".hdf5", unknown results return auto
16FileType guess_file_type_from_extension(const std::string_view& suffix);
17} // namespace utils
18
19std::shared_ptr<Mesh> read_mesh(const std::filesystem::path& filename, FileType file_type);
20
21std::shared_ptr<Mesh> read_mesh(
22 const std::filesystem::path& filename,
23 const std::vector<std::vector<std::string>>& retrieved_attributes,
24 FileType file_type = FileType::Auto);
25
26std::shared_ptr<Mesh> read_mesh(
27 const std::filesystem::path& filename,
28 const bool ignore_z_if_zero = false,
29 const std::vector<std::string>& tetrahedron_attributes = {},
30 FileType file_type = FileType::Auto);
31
32
33} // namespace wmtk::io
FileType guess_file_type(const std::filesystem::path &filename)
Definition read_mesh.cpp:20
FileType guess_file_type_from_extension(const std::string_view &suffix)
Definition read_mesh.cpp:9
std::shared_ptr< Mesh > read_mesh(const std::filesystem::path &filename, FileType file_type)
Definition read_mesh.cpp:35