Diffusion of Cu adatoms and dimers on Cu(111) and Ag(111) surfaces