Seismic analysis and retrofitting of civil engineering structures