Quality assessment and control of finite element solutions