NetDEM v1.0
Loading...
Searching...
No Matches
tetmesh.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "stl_model.hpp"
4#include "utils_macros.hpp"
5#include <string>
6
7namespace netdem {
8
17class TetMesh {
18public:
21
24
27
30
33
36
39
42
45
53 TetMesh();
54
65 TetMesh(const VecXT<Vec3d> &tv, const VecXT<Vec4i> &tt);
66
77 TetMesh(STLModel const &stl_model, double mesh_size);
78
90 TetMesh(const VecXT<Vec3d> &vv, const VecXT<Vec3i> &ff, double mesh_size);
91
98 void Init();
99
110
119 void SaveAsVTK(std::string const &file);
120
121private:
129 void InitBoundary();
130};
131
132} // namespace netdem
Class for working with STL models.
Definition stl_model.hpp:17
A class that represents a tetrahedral mesh.
Definition tetmesh.hpp:17
VecXT< Vec3i > bound_facets
The boundary facets in the mesh.
Definition tetmesh.hpp:26
VecXT< Vec2i > bound_edges
The boundary edges in the mesh.
Definition tetmesh.hpp:29
void SaveAsVTK(std::string const &file)
Saves the tetrahedral mesh as a VTK file.
Definition tetmesh.cpp:49
VecXT< Vec3d > surface_nodes
The surface nodes in the mesh.
Definition tetmesh.hpp:35
VecXT< Vec4i > elements
The tetrahedra in the mesh.
Definition tetmesh.hpp:23
VecXT< double > bound_facet_areas
The areas of the boundary facets in the mesh.
Definition tetmesh.hpp:44
TetMesh()
Constructs a new TetMesh object with an empty node and element list.
Definition tetmesh.cpp:15
VecXT< Vec3d > nodes
The nodes in the tetrahedral mesh.
Definition tetmesh.hpp:20
void Init()
Initializes the tetrahedral mesh.
Definition tetmesh.cpp:34
VecXT< Vec3i > surface_facets
The surface facets in the mesh.
Definition tetmesh.hpp:38
VecXT< VecXT< int > > surface_node_linked_boundaries
The IDs of the boundary facets that contain each surface node.
Definition tetmesh.hpp:41
VecXT< int > bound_nodes
The boundary nodes in the mesh.
Definition tetmesh.hpp:32
STLModel GetSurfaceSTL()
Creates an STL model representing the surface of the tetrahedral mesh.
Definition tetmesh.cpp:36
Definition bond_entry.hpp:7
std::vector< T > VecXT
Definition utils_macros.hpp:31