PolyFEM
Loading...
Searching...
No Matches
MeshData.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <Eigen/Core>
4
5#include <utility>
6#include <vector>
7
8namespace polyfem::mesh
9{
12 {
13 public:
14 MeshData(Eigen::MatrixXd vertices, Eigen::MatrixXi elements)
15 : vertices(std::move(vertices)), elements(std::move(elements)) {}
16
17 void validate() const;
18 int dimension() const { return vertices.cols(); }
19 bool has_polyhedral_topology() const { return !faces.empty(); }
20
21 Eigen::MatrixXd vertices;
22 Eigen::MatrixXi elements;
26
27 std::vector<int> body_ids;
28 std::vector<int> geometry_ids;
29 std::vector<int> node_ids;
30 std::vector<std::vector<int>> boundary_elements;
31 std::vector<int> boundary_ids;
32
33 Eigen::MatrixXd higher_order_nodes;
34 std::vector<std::vector<int>> higher_order_connectivity;
35 std::vector<std::vector<double>> higher_order_weights;
36
38 std::vector<std::vector<int>> faces;
39 std::vector<std::vector<int>> cell_faces;
40 std::vector<std::vector<int>> cell_face_orientations;
41 std::vector<bool> cell_is_hex;
42 Eigen::MatrixXd cell_kernel_points;
43 };
44} // namespace polyfem::mesh
Format-independent input used to construct a runtime Mesh.
Definition MeshData.hpp:12
Eigen::MatrixXd vertices
Definition MeshData.hpp:21
bool has_polyhedral_topology() const
Definition MeshData.hpp:19
Eigen::MatrixXd higher_order_nodes
Definition MeshData.hpp:33
std::vector< std::vector< int > > higher_order_connectivity
Definition MeshData.hpp:34
std::vector< int > node_ids
Definition MeshData.hpp:29
std::vector< int > geometry_ids
Definition MeshData.hpp:28
std::vector< std::vector< int > > boundary_elements
Definition MeshData.hpp:30
std::vector< std::vector< int > > faces
Optional topology for arbitrary polyhedral cells.
Definition MeshData.hpp:38
std::vector< int > body_ids
Definition MeshData.hpp:27
bool elements_are_ordered
Whether each element row carries a format-defined local vertex order.
Definition MeshData.hpp:25
std::vector< int > boundary_ids
Definition MeshData.hpp:31
Eigen::MatrixXi elements
Definition MeshData.hpp:22
void validate() const
Definition MeshData.cpp:7
Eigen::MatrixXd cell_kernel_points
Definition MeshData.hpp:42
MeshData(Eigen::MatrixXd vertices, Eigen::MatrixXi elements)
Definition MeshData.hpp:14
std::vector< std::vector< int > > cell_faces
Definition MeshData.hpp:39
std::vector< std::vector< int > > cell_face_orientations
Definition MeshData.hpp:40
std::vector< std::vector< double > > higher_order_weights
Definition MeshData.hpp:35
std::vector< bool > cell_is_hex
Definition MeshData.hpp:41