Vectorial beam-propagation method for integrated optics