A device based on a bent crystal with a variable curvature for controlling particle beams at accelerators