Chandrasekhar algorithm