Magnetization reversal in an ordered array of ferromagnetic nanodots