Material forces in inhomogeneous ferroelectric crystals