A new type of adaptive h-version mesh refinement associated with magne
tostatic integral formulations is proposed, In this method the magneti
c field due to a locally estimated error in the magnetization is integ
rated in a region where high accuracy is required, such as in the air
gap. This remote error (i.e. the contribution of each element to the e
rror in a remote region) is then used to determine the need for the el
ement subdivision. The presented results indicate that the magnetic fi
elds in the apertures of the dipole and quadrupole magnets can be comp
uted with high accuracy using small number of elements.