How to apply a constant inhomogeneous initial stress field (in linear elasticity)?

See for instance: