45 void refine(
const int n_refinement,
const double t)
override;
56 inline int cell_vertex(
const int c_id,
const int lv_id)
const override
79 double quad_area(
const int gid)
const override;
132 std::cerr <<
"never user this function" << std::endl;
142 std::unique_ptr<Mesh>
copy()
const override;
Conforming 3D mesh of tetrahedra, hexahedra, prisms, pyramids and general polyhedra,...
void get_edge_elements_neighs(const int e_id, std::vector< int > &ids) const override
RowVectorNd cell_barycenter(const int c) const override
cell barycenter
RowVectorNd edge_barycenter(const int e) const override
edge barycenter
Navigation3D::Index get_index_from_element_face(int hi, int v0, int v1, int v2) const override
int n_cell_faces(const int c_id) const override
Navigation3D::Index get_index_from_element(int hi) const override
int cell_face(const int c_id, const int lf_id) const override
bool build_topology(const MeshData &data) override
Construct only the dimension-specific topology.
int cell_edge(const int c_id, const int le_id) const override
void normalize() override
normalize the mesh
bool is_conforming() const override
if the mesh is conforming
int edge_vertex(const int e_id, const int lv_id) const override
id of the edge vertex
int n_cell_edges(const int c_id) const override
Navigation3D::Index switch_element(Navigation3D::Index idx) const override
void refine(const int n_refinement, const double t) override
refine the mesh
int n_edges() const override
number of edges
int face_vertex(const int f_id, const int lv_id) const override
id of the face vertex
void compute_boundary_ids(const std::function< int(const size_t, const std::vector< int > &, const RowVectorNd &, bool)> &marker) override
computes boundary selections based on a function
CMesh3D(CMesh3D &&)=default
RowVectorNd face_barycenter(const int f) const override
face barycenter
CMesh3D & operator=(CMesh3D &&)=default
int n_vertices() const override
number of vertices
bool is_boundary_face(const int face_global_id) const override
is face boundary
CMesh3D & operator=(const CMesh3D &)=default
bool is_boundary_edge(const int edge_global_id) const override
is edge boundary
void apply_affine_transformation(const MatrixNd &A, const VectorNd &b) override
Also moves the kernel points of the elements, used by polyhedral quadrature and refinement.
double quad_area(const int gid) const override
area of a quad face of an hex mesh
std::vector< uint32_t > vertex_neighs(const int v_gid) const override
void get_vertex_elements_neighs(const int v_id, std::vector< int > &ids) const override
Navigation3D::Index next_around_face(Navigation3D::Index idx) const override
bool is_boundary_vertex(const int vertex_global_id) const override
is vertex boundary
Mesh3DStorage & mesh_storge()
RowVectorNd kernel(const int cell_id) const override
Navigation3D::Index next_around_edge(Navigation3D::Index idx) const override
void attach_higher_order_nodes(const Eigen::MatrixXd &V, const std::vector< std::vector< int > > &nodes) override
attach high order nodes
int cell_face_orientation(const int c_id, const int lf_id) const override
void set_point(const int global_index, const RowVectorNd &p) override
Set the point.
void bounding_box(RowVectorNd &min, RowVectorNd &max) const override
computes the bbox of the mesh
virtual ~CMesh3D()=default
bool build_storage_from_cells(const Eigen::MatrixXd &V, const std::vector< StandardCell > &cells)
Navigation3D::Index get_index_from_element_edge(int hi, int v0, int v1) const override
void append(const Mesh &mesh) override
appends a new mesh to the end of this
int n_cells() const override
number of cells
int n_faces() const override
number of faces
Navigation3D::Index switch_vertex(Navigation3D::Index idx) const override
std::vector< uint32_t > edge_neighs(const int e_gid) const override
Navigation3D::Index get_index_from_element(int hi, int lf, int lv) const override
std::unique_ptr< Mesh > copy() const override
Create a copy of the mesh.
void remove_elements(const std::vector< bool > &keep) override
Remove all top-dimensional elements whose mask entry is false.
void compute_elements_tag() override
compute element types, see ElementType
Navigation3D::Index switch_edge(Navigation3D::Index idx) const override
int n_cell_vertices(const int c_id) const override
number of vertices of a cell
Navigation3D::Index switch_face(Navigation3D::Index idx) const override
void barycentric_coords(const RowVectorNd &p, const int el_id, Eigen::MatrixXd &coord) const override
constructs barycentric coodiantes for a point p.
bool is_boundary_element(const int element_global_id) const override
is cell boundary
int n_face_vertices(const int f_id) const override
number of vertices of a face
int cell_vertex(const int c_id, const int lv_id) const override
id of the vertex of a cell
CMesh3D(const CMesh3D &)=default
void compute_body_ids(const std::function< int(const size_t, const std::vector< int > &, const RowVectorNd &)> &marker) override
computes boundary selections based on a function
int size() const
Number of rows (a moved-from array has none).
int row_size(const int i) const
3D mesh interface: the elements are the cells (tetrahedra, hexahedra, prisms, pyramids or general pol...
Topology of a conforming 3D mesh (used by CMesh3D), stored as flat arrays indexed by entity id.
JaggedArray< uint8_t > cell_fs_flag
JaggedArray< uint32_t > cell_input_vs
input order (rows may be empty)
std::vector< uint8_t > vertex_boundary
Eigen::MatrixXd points
Vertex positions, 3 x #vertices.
JaggedArray< uint32_t > face_vs
std::vector< uint8_t > face_boundary
JaggedArray< uint32_t > cell_vs
navigation order (see above)
JaggedArray< uint32_t > cell_es
JaggedArray< uint32_t > vertex_hs
JaggedArray< uint32_t > edge_hs
std::vector< std::array< uint32_t, 2 > > edge_vs
JaggedArray< uint32_t > cell_fs
std::vector< uint8_t > edge_boundary
Format-independent input used to construct a runtime Mesh.
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes.
Index next_around_3Dedge(const Mesh3DStorage &M, Index idx)
Index switch_element(const Mesh3DStorage &M, Index idx)
Index get_index_from_element_tri(const Mesh3DStorage &M, int hi, int v0, int v1, int v2)
Index switch_vertex(const Mesh3DStorage &M, Index idx)
Index get_index_from_element_face(const Mesh3DStorage &M, int hi)
Index get_index_from_element_edge(const Mesh3DStorage &M, int hi, int v0, int v1)
Index switch_edge(const Mesh3DStorage &M, Index idx)
Index next_around_2Dface(const Mesh3DStorage &M, Index idx)
Index switch_face(const Mesh3DStorage &M, Index idx)
Eigen::Matrix< double, Eigen::Dynamic, 1, 0, 3, 1 > VectorNd
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 3, 3 > MatrixNd
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd