An optimization-based framework for anisotropic simplex mesh adaptation