How to Computationally Determine the Maximum Stable Operation Current of an HTS Magnet