Continuum and layer-resolved calculations are used to investigate the spin
structure in the vicinity of grain boundaries. Reduced exchange in the grai
n-boundary region gives rise to a quasidiscontinuity of the magnetization a
nd yields a perturbation which decays exponentially inside the grains. An e
ffective intergranular exchange is obtained as a micromagnetically well-def
ined function of the grain-boundary exchange, and it is discussed how grain
boundaries affect the hysteresis loops of nanostructures.