14 for (
int i = 0; i <
elements.rows(); ++i)
17 bool found_padding =
false;
18 for (
int j = 0; j <
elements.cols(); ++j)
26 if (found_padding || vertex < 0 || vertex >=
vertices.rows())
34 const auto require_elements = [&](
const size_t size,
const std::string &name) {
35 if (size != 0 && size !=
size_t(
elements.rows()))
38 require_elements(
body_ids.size(),
"body_ids");
46 log_and_throw_error(
"MeshData boundary_elements and boundary_ids must be provided together.");
53 for (
const int vertex : element)
54 if (vertex < 0 || vertex >=
vertices.rows())
59 log_and_throw_error(
"MeshData higher-order nodes and connectivity must be provided together.");
64 for (
const int node : connectivity)
81 require_elements(
cell_faces.size(),
"cell_faces");
83 require_elements(
cell_is_hex.size(),
"cell_is_hex");
86 for (
const auto &face :
faces)
90 for (
const int vertex : face)
91 if (vertex < 0 || vertex >=
vertices.rows())
94 for (
int i = 0; i <
elements.rows(); ++i)
99 if (orientation != 0 && orientation != 1)
102 if (face < 0 || face >=
faces.size())
bool has_polyhedral_topology() const
Eigen::MatrixXd higher_order_nodes
std::vector< std::vector< int > > higher_order_connectivity
std::vector< int > node_ids
std::vector< int > geometry_ids
std::vector< std::vector< int > > boundary_elements
std::vector< std::vector< int > > faces
Optional topology for arbitrary polyhedral cells.
std::vector< int > body_ids
std::vector< int > boundary_ids
Eigen::MatrixXd cell_kernel_points
std::vector< std::vector< int > > cell_faces
std::vector< std::vector< int > > cell_face_orientations
std::vector< std::vector< double > > higher_order_weights
std::vector< bool > cell_is_hex
void log_and_throw_error(const std::string &msg)