Use of the virtual-casing principle in calculating the containing magnetic field in toroidal plasma systems