  We use a lattice determination of the hadronic vacuum polarization tensor to
study the associated Ward identities and compute the Adler function. The vacuum
polarization tensor is computed from a combination of point-split and local
vector currents, using two flavours of O($a$)-improved Wilson fermions.
Partially twisted boundary conditions are employed to obtain a fine momentum
resolution. The modifications of the Ward identities by lattice artifacts and
by the use of twisted boundary conditions are monitored. We determine the Adler
function from the derivative of the vacuum polarization function over a large
region of momentum transfer $q^2$. As a first account of systematic effects, a
continuum limit scaling analysis is performed in the large $q^2$ regime.
