General expressions for the magnetic self-energy and the shape anisotr
opy of heterogeneous bodies have been derived. Heterogeneous bodies of
arbitrary shape are assumed to be composed of coherently packed fine
particles of arbitrary shape. Our mean-field approach is compared with
the previous approaches to the problem of dipolar interactions specif
ic to the magnetic systems with multilayer, granular, and columnar mic
rostructure or thin films with surface roughness.