Added methods in TwoNodeElement to calculate the x and y midpoints