Date of this Version
We propose a microscopic approach to the studies of magnetic configurations in hard magnets which may be conveniently used for nanoscale systems; the microstructure of the magnet is easily and naturally included in the calculations. This approach is applied to find the structure of macrodomain walls in polytwinned magnets of the CoPt family. Magnetostatic fields are small compared to the anisotropy field in these magnets; direct simulation shows that in this case the macrodomain wall is not continuous, but rather comprised of segments held together by relatively small magnetostatic forces. This segmentation is expected to have a strong effect on magnetization processes.