  In beam shaping applications, the minimization of the number of necessary
optical elements for the beam shaping process can benefit the compactness of
the optical system and reduce its cost. The single freeform surface design for
input wavefronts, which are neither planar nor spherical, is therefore of
interest. In this work, the design of single freeform surfaces for a given
zero-\'etendue source and complex target irradiances is investigated. Hence,
not only collimated input beams or point sources are assumed. Instead, a
predefined input ray direction vector field and irradiance distribution on a
source plane, which has to be redistributed by a single freeform surface to
give the predefined target irradiance, is considered. To solve this design
problem, a partial differential equation (PDE) or PDE system, respectively, for
the unknown surface and its corresponding ray mapping is derived from energy
conservation and the ray-tracing equations. In contrast to former PDE
formulations of the single freeform design problem, the derived PDE of
Monge-Amp\`ere type is formulated for general zero-\'etendue sources in
cartesian coordinates. The PDE system is discretized with finite differences
and the resulting nonlinear equation system solved by a root-finding algorithm.
The basis of the efficient solution of the PDE system builds the introduction
of an initial iterate constuction approach for a given input direction vector
field, which uses optimal mass transport with a quadratic cost function. After
a detailed description of the numerical algorithm, the efficiency of the design
method is demonstrated by applying it to several design examples. This includes
the redistribution of a collimated input beam beyond the paraxial
approximation, the shaping of point source radiation and the shaping of an
astigmatic input wavefront into a complex target irradiance distribution.
