A global-local approach for the elastoplastic analysis of compact and thin-walled structures via refined models