A new method for assessing the safety of ships damaged by grounding