Numerical validation and performance optimization on GPUs of an application in atomic physics