33 void refine(
const int n_refinement,
const double t)
override;
62 std::pair<RowVectorNd, int>
face_node(
const Navigation::Index &index,
const int n_new_nodes,
const int i,
const int j)
const override;
94 std::unique_ptr<Mesh>
copy()
const override;
Conforming 2D mesh of arbitrary polygons, stored in a PolygonMesh.
virtual RowVectorNd edge_barycenter(const int index) const override
edge barycenter
Navigation::Index switch_edge(Navigation::Index idx) const override
void normalize() override
normalize the mesh
void compute_elements_tag() override
compute element types, see ElementType
virtual ~CMesh2D()=default
int n_faces() const override
number of faces
int n_face_vertices(const int f_id) const override
number of vertices of a face
CMesh2D & operator=(const CMesh2D &)=default
int n_vertices() const override
number of vertices
CMesh2D(CMesh2D &&)=default
int n_edges() const override
number of edges
Navigation::Index switch_face(Navigation::Index idx) const override
bool is_boundary_element(const int element_global_id) const override
is cell boundary
double edge_length(const int gid) const override
edge length
std::pair< RowVectorNd, int > edge_node(const Navigation::Index &index, const int n_new_nodes, const int i) const override
std::unique_ptr< Mesh > copy() const override
Create a copy of the mesh.
Navigation::Index switch_vertex(Navigation::Index idx) const override
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
void set_point(const int global_index, const RowVectorNd &p) override
Set the point.
bool build_topology(const MeshData &data) override
Construct only the dimension-specific topology.
bool is_boundary_edge(const int edge_global_id) const override
is edge boundary
CMesh2D & operator=(CMesh2D &&)=default
std::pair< RowVectorNd, int > face_node(const Navigation::Index &index, const int n_new_nodes, const int i, const int j) const override
void append(const Mesh &mesh) override
appends a new mesh to the end of this
int edge_vertex(const int e_id, const int lv_id) const override
id of the edge vertex
Navigation::Index get_index_from_face(int f, int lv=0) const override
virtual void bounding_box(RowVectorNd &min, RowVectorNd &max) const override
computes the bbox of the mesh
CMesh2D(const CMesh2D &)=default
bool is_boundary_vertex(const int vertex_global_id) const override
is vertex boundary
void remove_elements(const std::vector< bool > &keep) override
Remove all top-dimensional elements whose mask entry is false.
int cell_vertex(const int f_id, const int lv_id) const override
id of the vertex of a cell
void attach_higher_order_nodes(const Eigen::MatrixXd &V, const std::vector< std::vector< int > > &nodes) override
attach high order nodes
void refine(const int n_refinement, const double t) override
refine the mesh
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
bool is_conforming() const override
if the mesh is conforming
virtual void update_elements_tag() override
Update elements types.
2D mesh interface: the elements are the faces (polygons) and the boundary elements are the edges.
Format-independent input used to construct a runtime Mesh.
Abstract mesh class to capture 2d/3d conforming and non-conforming meshes.
Minimal polygonal surface mesh used as the storage of CMesh2D.
int facet_vertex(const int f, const int lv) const
int n_facet_vertices(const int f) const
std::vector< bool > boundary_edge
Whether each edge is on the boundary.
int edge_vertex(const int e, const int lv) const
std::vector< bool > boundary_vertex
Whether each vertex is on the boundary.
Index switch_face(const PolygonMesh &M, Index idx)
Index get_index_from_face(const PolygonMesh &M, int f, int lv)
Index switch_edge(const PolygonMesh &M, Index idx)
Index switch_vertex(const PolygonMesh &M, Index idx)
Eigen::Matrix< double, 1, Eigen::Dynamic, Eigen::RowMajor, 1, 3 > RowVectorNd