Calculation of non-Newtonian flow of colloidal dispersions: Finite elements and Brownian dynamics