Dissipating and re-centring devices for portal-frame precast structures