Curvilinear mesh generation using a variational framework. (October 2018)