Centroid calculation: U-shape

Compute the location of the centroid in the y direction.