def METHOD_NAME(self, cell):
    """Generate the mesh. Should also include optimizing the mesh quality.
    """
    gmsh.option.setNumber("Mesh.MeshSizeMin", self.DX)
    gmsh.option.setNumber("Mesh.MeshSizeMax", self.DX)
    if cell == "hex":
        gmsh.model.mesh.set_transfinite_automatic(recombine=True)
        #nnodes = 3 + int(self.DOMAIN_Y/self.DX + 0.5)
        #gmsh.model.mesh.set_transfinite_curve(self.l_xneg, nnodes)
        #gmsh.model.mesh.set_transfinite_curve(self.l_split0, nnodes)
        #gmsh.model.mesh.set_transfinite_surface(self.s_xmid, cornerTags=self.xmid_corners)
        #gmsh.model.mesh.set_recombine(3, self.s_xmid)
    gmsh.model.mesh.generate(3)
    gmsh.model.mesh.optimize("Laplace2D")