#pragma once #include #include #include #include #include #include #include #include "sha-base-framework/frame.h" #include "sha-surface-mesh/matmesh.h" #include "sha-volume-mesh/matmesh.h" namespace da { namespace sha { double approximate(const double x, const double eps); auto ComputeGradientOperatorsOfTetrahedronMesh(const TetrahedralMatMesh &tetrahedral_matmesh) -> std::vector>; using VertexIndexEdge = std::pair; using Chain = std::deque; auto ConvertEdgesSoupToChains(const std::vector> &edges_soup) -> std::vector; enum Orientation { X = 0, NegX, Y, NegY, Z, NegZ }; auto GetNondirectionalIndexByOrientation(Orientation orientation) -> index_t; struct OrientedPatch { std::vector face_indices; std::set boundary_edge_indices; std::map neighbor_patches_with_boundary_length; std::set neighbor_orientations; Orientation orientation; double edge_length; }; void DivideMeshIntoPatchesByOrientation(const SurfaceTopoMesh3 &mesh3, const Eigen::MatrixXd &mat_coordinates, const std::vector &surface_orientations, std::vector &oriented_patches, std::vector &map_face_to_patch, std::vector &boundary_edges_soup); auto MarkMeshFaceOrientations(const Eigen::MatrixXd &mat_coordinates, const Eigen::MatrixXi &mat_faces) -> std::vector; void PostProcessOptimalTetrahedronPolycube(const TetrahedralMatMesh &tetrahedral_matmesh, Eigen::MatrixXd &mat_tetrahedral_polycube_coordinates); auto RemeshTetrahedronPolycubeToHexhahedron( const TetrahedralMatMesh &tetrahedral_matmesh, const Eigen::MatrixXd &mat_tetrahedral_polycube_coordinates, const Eigen::Vector3d &scale) -> HexahedralMatMesh; auto DeformHexadralPolycubeMeshToOriginalDomain( const TetrahedralMatMesh &tetrahedral_matmesh, const Eigen::MatrixXd &mat_polycube_tetrahedral_coordinates, const HexahedralMatMesh &hexahedral_polycube_matmesh) -> Eigen::MatrixXd; } // namespace sha } // namespace da