The mixing angles in matter for three generations of neutrinos and the MSW mechanism