2 #include <libmesh/distributed_mesh.h> 3 #include <libmesh/elem.h> 4 #include <libmesh/mesh_generation.h> 5 #include <libmesh/utility.h> 21 CPPUNIT_TEST( testRemoteElemError );
23 CPPUNIT_TEST_SUITE_END();
44 #ifdef LIBMESH_ENABLE_EXCEPTIONS 49 bool threw_expected_error =
true;
52 for (
const auto & elem :
mesh.element_ptr_range())
54 threw_expected_error =
false;
56 if (neigh && neigh->n_sides() != 2)
57 CPPUNIT_ASSERT(
false);
62 std::regex msg_regex(
"merely a shim");
63 CPPUNIT_ASSERT(std::regex_search(e.what(), msg_regex));
64 threw_expected_error =
true;
67 CPPUNIT_ASSERT(threw_expected_error);
69 #endif // LIBMESH_ENABLE_EXCEPTIONS libMesh::Parallel::Communicator * TestCommWorld
This is the base class from which all geometric element types are derived.
CPPUNIT_TEST_SUITE_REGISTRATION(DistributedMeshTest)
The libMesh namespace provides an interface to certain functionality in the library.
processor_id_type n_processors() const
The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical fu...
void testRemoteElemError()
A class to represent the internal "this should never happen" errors, to be thrown by "libmesh_error()...
SimpleRange< NeighborPtrIter > neighbor_ptr_range()
Returns a range with all neighbors of an element, usable in range-based for loops.