NetDEM v1.0
|
A class that represents a tetrahedral mesh. More...
#include <tetmesh.hpp>
Public Member Functions | |
TetMesh () | |
Constructs a new TetMesh object with an empty node and element list. | |
TetMesh (const VecXT< Vec3d > &tv, const VecXT< Vec4i > &tt) | |
Constructs a new TetMesh object with the given nodes and tetrahedra. | |
TetMesh (STLModel const &stl_model, double mesh_size) | |
Constructs a new TetMesh object from an STL model with the given mesh size. | |
TetMesh (const VecXT< Vec3d > &vv, const VecXT< Vec3i > &ff, double mesh_size) | |
Constructs a new TetMesh object with the given surface nodes, surface facets, and element size. | |
void | Init () |
Initializes the tetrahedral mesh. | |
STLModel | GetSurfaceSTL () |
Creates an STL model representing the surface of the tetrahedral mesh. | |
void | SaveAsVTK (std::string const &file) |
Saves the tetrahedral mesh as a VTK file. | |
Public Attributes | |
VecXT< Vec3d > | nodes |
The nodes in the tetrahedral mesh. | |
VecXT< Vec4i > | elements |
The tetrahedra in the mesh. | |
VecXT< Vec3i > | bound_facets |
The boundary facets in the mesh. | |
VecXT< Vec2i > | bound_edges |
The boundary edges in the mesh. | |
VecXT< int > | bound_nodes |
The boundary nodes in the mesh. | |
VecXT< Vec3d > | surface_nodes |
The surface nodes in the mesh. | |
VecXT< Vec3i > | surface_facets |
The surface facets in the mesh. | |
VecXT< VecXT< int > > | surface_node_linked_boundaries |
The IDs of the boundary facets that contain each surface node. | |
VecXT< double > | bound_facet_areas |
The areas of the boundary facets in the mesh. | |
A class that represents a tetrahedral mesh.
The TetMesh
class is responsible for creating and managing a tetrahedral mesh. It provides functionality to initialize the mesh, compute connectivity between nodes and elements, create a surface mesh, and save the mesh as a VTK file.
TetMesh::TetMesh | ( | ) |
TetMesh::TetMesh | ( | STLModel const & | stl_model, |
double | mesh_size ) |
Constructs a new TetMesh
object with the given surface nodes, surface facets, and element size.
This constructor creates a new TetMesh
object with the given surface nodes, surface facets, and element size.
vv | The surface nodes. |
ff | The surface facets. |
mesh_size | The size of the elements in the mesh. |
STLModel TetMesh::GetSurfaceSTL | ( | ) |
Creates an STL model representing the surface of the tetrahedral mesh.
This function creates an STL model representing the surface of the tetrahedral mesh.
void TetMesh::Init | ( | ) |
Initializes the tetrahedral mesh.
This function initializes the tetrahedral mesh by computing the connectivity between nodes and elements and creating a surface mesh.
void TetMesh::SaveAsVTK | ( | std::string const & | file | ) |
Saves the tetrahedral mesh as a VTK file.
This function saves the tetrahedral mesh as a VTK file with the given filename.
file | The name of the file to save the tetrahedral mesh to. |
VecXT<double> netdem::TetMesh::bound_facet_areas |
The areas of the boundary facets in the mesh.
VecXT<int> netdem::TetMesh::bound_nodes |
The boundary nodes in the mesh.
The nodes in the tetrahedral mesh.
The surface facets in the mesh.
The IDs of the boundary facets that contain each surface node.
The surface nodes in the mesh.