Mesh management¶
Functions helpers to create simple volume or surface meshes from sets of nodes.
tetboundary¶
-
template<typename T>
auto castor::tetboundary(matrix<std::size_t> const &tet, matrix<T> const &vtx)¶ Extracts the boundary of a tetrahedral mesh defined by its elements elt and its vertices vtx and returns the result as a mesh in the same format.
matrix<> X({0.,1,0,0}), Y({0.,0,1,0}), Z({0,0,0,1}); matrix<> vtx, bvtx; matrix<> elt, belt; // Delaunay triangulation std::tie(elt,vtx) = tetdelaunay(X,Y,Z); // Boundary extraction std::tie(belt,bvtx) = tetboundary(elt,vtx);
See tetdelaunay.
tetdelaunay¶
-
template<typename T>
auto castor::tetdelaunay(matrix<T> const &X, matrix<T> const &Y, matrix<T> const &Z)¶ Creates a Delaunay tetrahedral mesh from a set of nodes (X,Y,Z).
matrix<> X({0.,1,0,0}), Y({0.,0,1,0}), Z({0,0,0,1}); matrix<> vtx; matrix<std::size_t> elt; // Delaunay triangulation std::tie(elt,vtx) = tetdelaunay(X,Y,Z);
See tetboundary.