The test mesh is designed to be square with the subdomain corresponding to the element number. We will use this to assert the correct pattern from the custom extruder.
52 const unsigned int n_elems_per_side = 4;
53 const unsigned int num_layers = 4;
54 const unsigned int n_elems_per_layer = n_elems_per_side * n_elems_per_side;
58 for (
unsigned int i=0; i<n_elems_per_layer; ++i)
61 Elem & elem = src_mesh.elem_ref(i);
69 QueryElemSubdomainID new_elem_subdomain_id;
77 for (
unsigned int i=0; i<n_elems_per_layer * num_layers; ++i)
80 Elem & elem = dest_mesh.elem_ref(i);
82 CPPUNIT_ASSERT_EQUAL(static_cast<unsigned int>(elem.
subdomain_id()), i%n_elems_per_layer + i/n_elems_per_layer );
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
libMesh::Parallel::Communicator * TestCommWorld
This is the base class from which all geometric element types are derived.
subdomain_id_type subdomain_id() const