         
     lbm_vars *h_vars = (lbm_vars*)malloc(sizeof(lbm_vars));
     initObstacles(h_vars);
-    initVelocity(h_vars);
     
     // Initialization of the populations at equilibrium with the given velocity.
     for (int y = 0; y < NY; y++) {
         for (int x = 0; x < NX; x++) {
-            h_equilibrium(h_vars->fin[x][y], 1.0, h_vars->vel[x][y]);
+            h_equilibrium(h_vars->fin[x][y], 1.0, h_consts->vel[y]);
         }
     }
     

    }
}

__host__ static void h_equilibrium(double* feq, double rho, double* u)
{
    double usqr = 3./2 * ( SQUARE(u[0]) + SQUARE(u[1]) );

    for (int f = 0; f < 9; f++) {
        double cu = 3 * ( V[0][f] * u[0] + V[1][f] * u[1] );
        feq[f] = rho * T[f] * ( 1 + cu + 0.5 * SQUARE(cu) - usqr );
    }                                                                
}

    initCol(h_consts->col[1],  0);
    initCol(h_consts->col[2], -1);
    initOpp(h_consts->opp);
  	initVelocity(h_consts->vel);
    memcpy(h_consts->v, V, sizeof(V));
    memcpy(h_consts->t, T, sizeof(T));
    
