     }
 }
 
-static void initRho(lbm_vars* vars)
-{
-    for (int x = 0; x < NX; x++) {
-        for (int y = 0; y < NY; y++) {
-            vars->rho[x][y] = 1.0;
-        }
-    }
-}
-
 static void initCol(size_t* col, ssize_t v0)
 {
     for (int f = 0, i = 0; f < 9 && i < 3; f++) {

    lbm_vars *h_vars = (lbm_vars*)malloc(sizeof(lbm_vars));
    initObstacles(h_vars);
    initVelocity(h_vars);
    initRho(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], h_vars->rho[x][y], h_vars->vel[x][y]);
        }
    }
    

        }

        // Compute macroscopic variables, density and velocity
        double rho, u0, u1;
        macroscopic(d_vars->fin[x][y], &rho, &u0, &u1);
        
        if (x == 0) {
            // Left wall: inflow condition
