Modeling of the forming operation in HfO2-base resistive switching memories