Adding gravity terms. cfl is adjusted based on dim. Give cfl between (0,1)