A general study of three-wave nonlinear mixing in the presence of longitudinal variations in phase-matching conditions is presented. The efficiency of second-harmonic generation and optical parametric amplification is quantified using a normalized set of equations and a polynomial description of the wave-vector mismatch as a function of the longitudinal coordinate. These modeling results are used to estimate the impact of spatial variations in wave-vector mismatch experimentally obtained for five partially deuterated potassium dihydrogen phosphate crystals. The longitudinal inhomogeneities in the properties of crystals of similar quality are not expected to have a significant impact on their use for second-harmonic generation and optical parametric amplification, but the efficiency of nonlinear processes in crystals with larger variations could decrease.