The three dimensional weak form of the conjugate gradient FFT method for solving scattering problems