8#include <geogram/mesh/mesh.h>
28 inline bool is_volume()
const override {
return true; }
32 virtual int cell_face(
const int c_id,
const int lf_id)
const = 0;
33 virtual int cell_edge(
const int c_id,
const int le_id)
const = 0;
35 void elements_boxes(std::vector<std::array<Eigen::Vector3d, 2>> &boxes)
const override;
38 void compute_cell_jacobian(
const int el_id,
const Eigen::MatrixXd &reference_map, Eigen::MatrixXd &jacobian)
const;
42 double tri_area(
const int gid)
const override;
46 std::pair<RowVectorNd, int>
cell_node(
const Navigation3D::Index &index,
const int n_new_nodes,
const int i,
const int j,
const int k)
const;
48 void get_edges(Eigen::MatrixXd &p0, Eigen::MatrixXd &p1)
const override;
49 void get_edges(Eigen::MatrixXd &p0, Eigen::MatrixXd &p1,
const std::vector<bool> &valid_elements)
const override;
59 virtual std::vector<uint32_t>
edge_neighs(
const int e_gid)
const = 0;
void to_vertex_functions(std::array< std::function< Navigation3D::Index(Navigation3D::Index)>, 8 > &to_vertex) const
Mesh3D & operator=(const Mesh3D &)=default
virtual Navigation3D::Index get_index_from_element(int hi, int lf, int lv) const =0
virtual Navigation3D::Index switch_element(Navigation3D::Index idx) const =0
double tri_area(const int gid) const override
area of a tri face of a tet mesh
virtual void get_edge_elements_neighs(const int e_id, std::vector< int > &ids) const =0
void compute_cell_jacobian(const int el_id, const Eigen::MatrixXd &reference_map, Eigen::MatrixXd &jacobian) const
virtual Navigation3D::Index get_index_from_element_edge(int hi, int v0, int v1) const =0
virtual ~Mesh3D()=default
virtual int n_cell_edges(const int c_id) const =0
virtual int cell_edge(const int c_id, const int le_id) const =0
virtual RowVectorNd kernel(const int cell_id) const =0
Mesh3D(const Mesh3D &)=default
void compute_element_barycenters(Eigen::MatrixXd &barycenters) const override
utility for 2d/3d.
Mesh3D(Mesh3D &&)=default
void elements_boxes(std::vector< std::array< Eigen::Vector3d, 2 > > &boxes) const override
constructs a box around every element (3d cell, 2d face)
std::array< int, 8 > get_ordered_vertices_from_hex(const int element_index) const
std::pair< RowVectorNd, int > cell_node(const Navigation3D::Index &index, const int n_new_nodes, const int i, const int j, const int k) const
virtual int n_cell_faces(const int c_id) const =0
virtual int cell_face(const int c_id, const int lf_id) const =0
virtual std::vector< uint32_t > edge_neighs(const int e_gid) const =0
void get_edges(Eigen::MatrixXd &p0, Eigen::MatrixXd &p1) const override
Get all the edges.
virtual Navigation3D::Index next_around_edge(Navigation3D::Index idx) const =0
virtual Navigation3D::Index switch_edge(Navigation3D::Index idx) const =0
void barycentric_coords(const RowVectorNd &p, const int el_id, Eigen::MatrixXd &coord) const override
constructs barycentric coodiantes for a point p.
std::pair< RowVectorNd, int > face_node(const Navigation3D::Index &index, const int n_new_nodes, const int i, const int j) const
virtual std::vector< uint32_t > vertex_neighs(const int v_gid) const =0
std::pair< RowVectorNd, int > edge_node(const Navigation3D::Index &index, const int n_new_nodes, const int i) const
Mesh3D & operator=(Mesh3D &&)=default
bool is_volume() const override
checks if mesh is volume
virtual void get_vertex_elements_neighs(const int v_id, std::vector< int > &ids) const =0
virtual std::array< int, 4 > get_ordered_vertices_from_tet(const int element_index) const
void to_edge_functions(std::array< std::function< Navigation3D::Index(Navigation3D::Index)>, 12 > &to_edge) const
virtual Navigation3D::Index next_around_face(Navigation3D::Index idx) const =0
virtual Navigation3D::Index switch_face(Navigation3D::Index idx) const =0
virtual Navigation3D::Index get_index_from_element_face(int hi, int v0, int v1, int v2) const =0
virtual Navigation3D::Index get_index_from_element(int hi) const =0
void to_face_functions(std::array< std::function< Navigation3D::Index(Navigation3D::Index)>, 6 > &to_face) const
virtual Navigation3D::Index switch_vertex(Navigation3D::Index idx) const =0
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes.
void cell_barycenters(Eigen::MatrixXd &barycenters) const
all cells barycenters
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd