PSO algorithms and GPGPU technique for electromagnetic problems