         calcRho_kernel<<<numBlocks, numThreads>>>(
             mR4CAST(sortedSphMarkersD->posRadD), mR4CAST(sortedSphMarkersD->rhoPresMuD), 
             mR4CAST(rhoPresMuD_old), U1CAST(markersProximityD->cellStartD), 
-            U1CAST(markersProximityD->cellEndD), numObjectsH->numFluidMarkers,
-            numObjectsH->numBoundaryMarkers, numObjectsH->numRigidMarkers, 
-            numObjectsH->numAllMarkers, density_initialization, isErrorD);
+            U1CAST(markersProximityD->cellEndD), density_initialization, isErrorD);
         ChUtilsDevice::Sync_CheckError(isErrorH, isErrorD, "calcRho_kernel");
         density_initialization = 0;
     }

                       uint* cellEnd,
                       uint* mapOriginalToSorted,
                       uint* sortedFreeSurfaceIdD,
                       const size_t numAllMarkers,
                       volatile bool* isErrorD) {
    uint id = blockIdx.x * blockDim.x + threadIdx.x;
    if (id >= numAllMarkers)
        return;

    // no need to do anything if it is not an active particle


    Real G_i[9] = {0.0};
    calc_G_Matrix(sortedPosRad, sortedVelMas, sortedRhoPreMu, G_i, cellStart, 
        cellEnd, indexOfIndex);

    // get address in grid
    int3 gridPos = calcGridPos(posRadA);
