2#include <libmesh/distributed_mesh.h>
3#include <libmesh/elem.h>
4#include <libmesh/mesh_generation.h>
5#include <libmesh/utility.h>
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;
55 for (
const Elem * neigh : elem->neighbor_ptr_range())
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);
CPPUNIT_TEST(testRemoteElemError)
void testRemoteElemError()
LIBMESH_CPPUNIT_TEST_SUITE(DistributedMeshTest)
The DistributedMesh class is derived from the MeshBase class, and is intended to provide identical fu...
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
Communicator * TestCommWorld
CPPUNIT_TEST_SUITE_REGISTRATION(DistributedMeshTest)
The libMesh namespace provides an interface to certain functionality in the library.