Added general function to set all 2D coils at once.