Spatial dependence of stress distribution for rod-shaped bacteria