1. A method for generating a model function h(x,y,z) implicitly representing geologic horizons, the method comprising: receiving geological data representing a fault network and horizons automatically extracted from seismic data in a studied domain; generating a three-dimensional (3D) mesh covering the studied domain, wherein the 3D mesh is divided into a plurality of fault blocks by the fault network; defining a discrete function h(x,y,z) to have values of the geological data representing horizons at discrete nodes of the 3D mesh; installing constraints on the discrete function h(x,y,z) defining surfaces representing horizons; installing constraints on the discrete function h(x,y,z) defining the uniqueness of the function h(x,y,z); interpolating the discrete function h(x,y,z) at the nodes of the 3D mesh to create a piecewise continuous function h(x,y,z) that honors the constraints; and displaying a model of the piecewise continuous horizon function h(x,y,z).