Direct solution of partial difference equations by tensor product methods