Numerical modelling of two-dimensional morphodynamics with applications to river bars and bifurcations