Development of a confined variational method for elastic scattering