Failure resistant topology optimization of structures using nonlocal elastoplastic-damage model