Theory of the coherent photovoltaic effect and the method of nonequilibrium Green's functions