void testMesh() { // There'd better be 3 elements CPPUNIT_ASSERT_EQUAL( (dof_id_type)3, _mesh->n_elem() ); // There'd better be only 6 nodes CPPUNIT_ASSERT_EQUAL( (dof_id_type)6, _mesh->n_nodes() ); /* The nodes for the EDGE2 element should have the same global ids as the bottom edge of the top QUAD4 element */ CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(0), _mesh->elem(0)->node(0) ); CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(1), _mesh->elem(0)->node(1) ); /* The nodes for the EDGE2 element should have the same global ids as the top edge of the bottom QUAD4 element */ CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(0), _mesh->elem(1)->node(3) ); CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(1), _mesh->elem(1)->node(2) ); /* The nodes for the bottom edge of the top QUAD4 element should have the same global ids as the top edge of the bottom QUAD4 element */ CPPUNIT_ASSERT_EQUAL( _mesh->elem(0)->node(0), _mesh->elem(1)->node(3) ); CPPUNIT_ASSERT_EQUAL( _mesh->elem(0)->node(1), _mesh->elem(1)->node(2) ); // We didn't set an interior_parent on the edge element, so it // should default to NULL CPPUNIT_ASSERT( !_mesh->elem(2)->interior_parent() ); }
void testMesh() { // There'd better be 3 elements CPPUNIT_ASSERT_EQUAL( (dof_id_type)3, _mesh->n_elem() ); // There'd better be only 6 nodes CPPUNIT_ASSERT_EQUAL( (dof_id_type)6, _mesh->n_nodes() ); /* The nodes for the EDGE2 element should have the same global ids as the bottom edge of the top QUAD4 element */ CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(0), _mesh->elem(0)->node(0) ); CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(1), _mesh->elem(0)->node(1) ); /* The nodes for the EDGE2 element should have the same global ids as the top edge of the bottom QUAD4 element */ CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(0), _mesh->elem(1)->node(3) ); CPPUNIT_ASSERT_EQUAL( _mesh->elem(2)->node(1), _mesh->elem(1)->node(2) ); /* The nodes for the bottom edge of the top QUAD4 element should have the same global ids as the top edge of the bottom QUAD4 element */ CPPUNIT_ASSERT_EQUAL( _mesh->elem(0)->node(0), _mesh->elem(1)->node(3) ); CPPUNIT_ASSERT_EQUAL( _mesh->elem(0)->node(1), _mesh->elem(1)->node(2) ); }