From: Wolfgang Bangerth Date: Sat, 18 Jun 2022 01:33:59 +0000 (+0900) Subject: Can't use ReferenceCells in switch-case. X-Git-Tag: v9.5.0-rc1~1190^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b5ae1f815aacd573e9eb163b722046cb25444ae;p=dealii.git Can't use ReferenceCells in switch-case. --- diff --git a/tests/simplex/poisson_01.cc b/tests/simplex/poisson_01.cc index 6392a7b4b6..e7bffa733e 100644 --- a/tests/simplex/poisson_01.cc +++ b/tests/simplex/poisson_01.cc @@ -257,35 +257,38 @@ test(const Triangulation &tria, Assert(reference_cells.size() == 1, ExcNotImplemented()); unsigned int lower = 0; unsigned int upper = 0; - switch (reference_cells[0]) + if (reference_cells[0] == ReferenceCells::Triangle) { - case ReferenceCells::Triangle: - lower = 111; - upper = 115; - break; - case ReferenceCells::Quadrilateral: - lower = 96; - upper = 100; - break; - case ReferenceCells::Tetrahedron: - lower = 154; - upper = 158; - break; - case ReferenceCells::Hexahedron: - lower = 132; - upper = 136; - break; - case ReferenceCells::Wedge: - lower = 194; - upper = 198; - break; - case ReferenceCells::Pyramid: - lower = 81; - upper = 85; - break; - default: - Assert(false, ExcInternalError()); + lower = 111; + upper = 115; } + else if (reference_cells[0] == ReferenceCells::Quadrilateral) + { + lower = 96; + upper = 100; + } + else if (reference_cells[0] == ReferenceCells::Tetrahedron) + { + lower = 154; + upper = 158; + } + else if (reference_cells[0] == ReferenceCells::Hexahedron) + { + lower = 132; + upper = 136; + } + else if (reference_cells[0] == ReferenceCells::Wedge) + { + lower = 194; + upper = 198; + } + else if (reference_cells[0] == ReferenceCells::Pyramid) + { + lower = 81; + upper = 85; + } + else + Assert(false, ExcInternalError()); check_solver_within_range( solver.solve(system_matrix, solution, system_rhs, PreconditionIdentity()),