Fast Inverse Preisach Models in Algorithms for Static and Quasistatic Magnetic-Field Computations