Wildmeshing Toolkit
input.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <filesystem>
4 
5 #include <wmtk/Mesh.hpp>
6 
8 namespace wmtk::components {
9 namespace utils {
10 class PathResolver;
11 }
12 
13 namespace input {
14 class InputOptions;
15 
16 
17 /*
18  * @brief Read a mesh from file.
19  *
20  * This method wraps MeshReader::read_mesh and adds some validity checks.
21  * It can read .msh and .hdf5 file format.
22  *
23  * @param file The mesh file.
24  * @param ignore_z_if_zero Ignore the z-component of points if it is zero and generate a mesh with
25  * 2D positions.
26  * @param tetrahedron_attributes Read tetrahedron attributes from an .msh file.
27  */
28 std::shared_ptr<Mesh> input(
29  const std::filesystem::path& file,
30  const bool ignore_z_if_zero = false,
31  const std::vector<std::string>& tetrahedron_attributes = {});
32 
33 multimesh::NamedMultiMesh input(
34  const InputOptions& options,
35  const components::utils::PathResolver& resolver);
36 
37 multimesh::NamedMultiMesh input(const InputOptions& options);
38 
39 } // namespace input
40 } // namespace wmtk::components
std::shared_ptr< Mesh > input(const std::filesystem::path &file, const bool ignore_z_if_zero, const std::vector< std::string > &tetrahedron_attributes)
Definition: input.cpp:12