A computer approach to the nonlinear hysteretic problem of electromagnetic field computation in hard superconductors for loss evaluation