Finite Element Modelling of Electroformation and Switching Mechanisms in TaOx-based Memory Device