  We present an Advanced Spectral Leakage (ASL) scheme to model neutrinos in
the context of core-collapse supernovae and compact binary mergers. Based on
previous gray leakage schemes, the ASL scheme computes the neutrino cooling
rates by interpolating local production and diffusion rates (relevant in
optically thin and thick regimes, respectively), separately for discretized
values of the neutrino energy. Neutrino trapped components are also modeled,
based on equilibrium and timescale arguments. The better accuracy achieved by
the spectral treatment allows a more reliable computation of neutrino heating
rates in optically thin conditions. The scheme has been calibrated and tested
against Boltzmann transport in the context of Newtonian spherically symmetric
models of core-collapse supernovae. ASL shows a very good qualitative and a
partial quantitative agreement, for key quantities from collapse to a few
hundreds of milliseconds after core bounce. We have proved the adaptability and
flexibility of our ASL scheme coupling it to an axisymmetric Eulerian and to a
three-dimensional SPH code to simulate core-collapse. Therefore, the neutrino
treatment presented here is ideal for large parameter-space explorations,
parametric studies, high-resolution tests, code developments, and long-term
modeling of asymmetric configurations, where more detailed neutrino treatments
are not available or currently computationally too expensive.
