Wildmeshing Toolkit
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 
8 namespace h5pp {
9 class File;
10 }
11 
12 namespace wmtk {
13 
14 class Mesh;
15 
17 {
18 public:
19  HDF5Reader();
20 
21  std::shared_ptr<Mesh> read(const std::filesystem::path& filename);
22 
23 private:
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,
30  PrimitiveType pt,
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)
Definition: HDF5Reader.cpp:208
std::shared_ptr< Mesh > read(const std::filesystem::path &filename)
Definition: HDF5Reader.cpp:44
std::shared_ptr< Mesh > read_mesh(h5pp::File &hdf5_file, const std::string &dataset)
Definition: HDF5Reader.cpp:123
Definition: Accessor.hpp:6