Self-adaptive-grid method with application to airfoil flow