Numerical analysis of high-temperature superconductors with the critical-state model