Response of a rigid foundation to a spatially random ground motion