void PatchDataTestNormals::test_get_corner_normals_infinite_domain()
{
  MsqPrintError err(cout);
  
    // Element 0 is a quad parallel to and below the Z plane.
    // All corners of the element lie on the unit sphere and
    // thus the normal should be the same as the location.
  const size_t elem_index = 0;
  std::vector<Vector3D> coords;
  Vector3D normals[4];
  unboundedMesh.get_element_vertex_coordinates( elem_index, coords, err );
  CPPUNIT_ASSERT( !err );
  CPPUNIT_ASSERT( coords.size() == 4 /*quad*/ );
  unboundedMesh.get_domain_normals_at_corners( elem_index, normals, err );
  CPPUNIT_ASSERT( !err );
  for (size_t i = 0; i < 4; ++i)
  {
    ASSERT_VECTORS_EQUAL( coords[i], normals[i] );
  }
}
void PatchDataTestNormals::test_get_corner_normals_bounded_domain()
{
  MsqPrintError err(cout);
  std::vector<Vector3D> coords;
  Vector3D normals[4];
  
    // Element 0 is a quad in the plane X=1/sqrt(2).  Two of
    // the vertices of this element lie on the lower bounding
    // curve of the cylinder, and the other two lie in the
    // Z=0 plane
  const size_t elem_index = 0;
  boundedMesh.get_element_vertex_coordinates( elem_index, coords, err );
  CPPUNIT_ASSERT( !err );
  CPPUNIT_ASSERT( coords.size() == 4 /*quad*/ );
  boundedMesh.get_domain_normals_at_corners( elem_index, normals, err );
  CPPUNIT_ASSERT( !err );
  for (size_t i = 0; i < 4; ++i)
  {
    coords[i][2] = 0; // project into Z plane
    ASSERT_VECTORS_EQUAL( coords[i], normals[i] );
  }
}