adding check for quadratic input mesh