In this paper we construct numerical schemes to approximate linear transport
equations with slab geometry by diffusion equations. We treat both the case of
pure diffusive scaling and the case where kinetic and diffusive scalings
coexist. The diffusion equations and their data are derived from asymptotic and
layer analysis which allows general scattering kernels and general data. We
apply the half-space solver in [20] to resolve the boundary layer equation and
obtain the boundary data for the diffusion equation. The algorithms are
validated by numerical experiments and also by error analysis for the pure
diffusive scaling case