Modeling layer-by-layer growth in ion beam assisted deposition of thin films