Locating and Classifying Critical Points of a 2D Function via Particle Swarm Optimization