Automated cache optimisations of stencil computations for partial differential equations