A Numerical Procedure for the 3D Design and the Optimisation of Active Shield Configurations for Stationary Magnetic Fields