Variable domain finite element analysis of free surface gravity flow