Fast beam propagation method for the analysis of second-order nonlinear phenomena