def METHOD_NAME(self, cell):
    """Generate the mesh.
    This method is abstract in the base class and must be implemented.
    """
    # Set the cell size
    gmsh.option.setNumber("Mesh.MeshSizeMin", self.DX)
    gmsh.option.setNumber("Mesh.MeshSizeMax", self.DX)
    if cell == "hex":
        # A transfinite mesh with recombine set to True should result in a hex mesh. 
        gmsh.model.mesh.set_transfinite_automatic(recombine=True)
    else:
        gmsh.option.setNumber("Mesh.Algorithm", 8)
    # Generate the mesh and then improve mesh quality using Laplacian smoothing.
    gmsh.model.mesh.generate(3)
    gmsh.model.mesh.optimize("Laplace2D")