Skip to content

Commit

Permalink
mroe helpful error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
mscroggs committed Jul 22, 2024
1 parent 135ec86 commit 1aee166
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/polynomials.rs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ pub fn polynomial_count(cell_type: ReferenceCellType, degree: usize) -> usize {
ReferenceCellType::Triangle => (degree + 1) * (degree + 2) / 2,
ReferenceCellType::Quadrilateral => (degree + 1) * (degree + 1),
_ => {
panic!("Unsupported cell type");
panic!("Unsupported cell type: {cell_type:?}");
}
}
}
Expand All @@ -450,7 +450,7 @@ pub fn derivative_count(cell_type: ReferenceCellType, derivatives: usize) -> usi
ReferenceCellType::Triangle => (derivatives + 1) * (derivatives + 2) / 2,
ReferenceCellType::Quadrilateral => (derivatives + 1) * (derivatives + 2) / 2,
_ => {
panic!("Unsupported cell type");
panic!("Unsupported cell type: {cell_type:?}");
}
}
}
Expand Down Expand Up @@ -492,7 +492,7 @@ pub fn tabulate_legendre_polynomials<
tabulate_legendre_polynomials_quadrilateral(points, degree, derivatives, data)
}
_ => {
panic!("Unsupported cell type");
panic!("Unsupported cell type: {cell_type:?}");
}
};
}
Expand Down

0 comments on commit 1aee166

Please sign in to comment.