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.
47 {
48 LOG_UNIT_TEST;
49
51
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;
55
56
58 for (unsigned int i=0; i<n_elems_per_layer; ++i)
59 {
60
61 Elem & elem = src_mesh.elem_ref(i);
63 }
64
66
68
69 QueryElemSubdomainID new_elem_subdomain_id;
70
76
77 for (unsigned int i=0; i<n_elems_per_layer * num_layers; ++i)
78 {
79
80 Elem & elem = dest_mesh.elem_ref(i);
81
82 CPPUNIT_ASSERT_EQUAL(
static_cast<unsigned int>(elem.
subdomain_id()), i%n_elems_per_layer + i/n_elems_per_layer );
83 }
84 }
This is the base class from which all geometric element types are derived.
subdomain_id_type subdomain_id() const
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...