        uint32_t* num_boxes_axis,
        int32_t* grid_dimensions,
        double* result) {
-    uint32_t tidx = blockIdx.x * blockDim.x + threadIdx.x;
-    // printf("[Kernel] box_id[tidx] = %d\n", box_id[tidx]);
-    // printf("[Kernel] num_objects = %d\n", num_objects[0]);
-    // printf("[Kernel] blockDim.x = %d\n", blockDim.x);
-    // printf("[Kernel] positions = {");
-    // for (uint32_t i = 0; i < 3*num_objects[0]; i++) {
-    //   printf("%p, ", &(positions[i]));
-    // }
-    // printf("}\n");
-    if (tidx < num_objects[0]) {
-      result[3*tidx + 0] = timestep[0] * tractor_force[3*tidx + 0];
-      result[3*tidx + 1] = timestep[0] * tractor_force[3*tidx + 1];
+  uint32_t tidx = blockIdx.x * blockDim.x + threadIdx.x;
+  // printf("[Kernel] box_id[tidx] = %d\n", box_id[tidx]);
+  // printf("[Kernel] num_objects = %d\n", num_objects[0]);
+  // printf("[Kernel] blockDim.x = %d\n", blockDim.x);
+  // printf("[Kernel] positions = {");
+  // for (uint32_t i = 0; i < 3*num_objects[0]; i++) {
+  //   printf("%p, ", &(positions[i]));
+  // }
+  // printf("}\n");
+  if (tidx < num_objects[0]) {
+    result[3*tidx + 0] = timestep[0] * tractor_force[3*tidx + 0];
+    result[3*tidx + 1] = timestep[0] * tractor_force[3*tidx + 1];
     result[3*tidx + 2] = timestep[0] * tractor_force[3*tidx + 2];
     
     double3 collision_force = make_double3(0, 0, 0);


#include "samples/common/inc/helper_math.h"
#include "core/gpu/displacement_op_cuda_kernel.h"

#define GpuErrchk(ans) { GpuAssert((ans), __FILE__, __LINE__); }
inline void GpuAssert(cudaError_t code, const char *file, int line, bool abort=true)

  cudaOccupancyMaxPotentialBlockSize(&minGridSize, &blockSize, collide, 0, num_objects[0]);
  gridSize = (num_objects[0] + blockSize - 1) / blockSize;

  // printMemoryUsage();

  // printf("gridSize = %d  |  blockSize = %d\n", gridSize, blockSize);
  collide<<<gridSize, blockSize>>>(d_positions_, d_diameters_, d_tractor_force_,
    d_adherence_, d_box_id_, d_mass_, d_timestep_, d_max_displacement_,
