Technique for rapid solution of the APW secular equation