36 {
37 LOG_UNIT_TEST;
38
40
41
42
44
45#ifdef LIBMESH_ENABLE_EXCEPTIONS
47 {
48
49
50 bool threw_expected_error = true;
51 try
52 {
53 for (
const auto & elem :
mesh.element_ptr_range())
54 {
55 threw_expected_error = false;
56 for (
const Elem * neigh : elem->neighbor_ptr_range())
57 if (neigh && neigh->n_sides() != 2)
58 CPPUNIT_ASSERT(false);
59 }
60 }
62 {
63 std::regex msg_regex("merely a shim");
64 CPPUNIT_ASSERT(std::regex_search(e.what(), msg_regex));
65 threw_expected_error = true;
66 }
67
68 CPPUNIT_ASSERT(threw_expected_error);
69 }
70#endif
71 }
This is the base class from which all geometric element types are derived.
A class to represent the internal "this should never happen" errors, to be thrown by "libmesh_error()...
processor_id_type n_processors() const