A virtual node algorithm for changing mesh topology during simulation