Wildmeshing Toolkit
Loading...
Searching...
No Matches
HDF5Reader.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <wmtk/Primitive.hpp>
4
5#include <filesystem>
6#include <vector>
7
8namespace h5pp {
9class File;
10}
11
12namespace wmtk {
13
14class Mesh;
15
17{
18public:
19 HDF5Reader();
20
21 std::shared_ptr<Mesh> read(const std::filesystem::path& filename);
22
23private:
24 std::shared_ptr<Mesh> read_mesh(h5pp::File& hdf5_file, const std::string& dataset);
25
26 template <typename T>
27 void set_attribute(
28 const T& default_val,
29 const std::string& name,
31 int64_t stride,
32 const std::vector<T>& v,
33 Mesh& mesh);
34};
35} // namespace wmtk
void set_attribute(const T &default_val, const std::string &name, PrimitiveType pt, int64_t stride, const std::vector< T > &v, Mesh &mesh)
std::shared_ptr< Mesh > read(const std::filesystem::path &filename)
std::shared_ptr< Mesh > read_mesh(h5pp::File &hdf5_file, const std::string &dataset)