3-D eddy-current computation with a self-adaptive refinement technique