         {
             for (int offset = warpSize/2; offset > 0; offset /= 2)
             {
-                val  = min(val,  __shfl_down(val, offset));
+                val  = min(val, __shfl_down(val, offset));
             }
             return val;
         }

        scalar  max_abs_component(const vectorfield & vf)
		{
			// We want the Maximum of Absolute Values of all force components on all images
			scalar absmax = 0;
			// Find minimum and maximum values
			std::pair<scalar,scalar> minmax = minmax_component(vf);
			// Mamimum of absolute values
			absmax = std::max(absmax, std::abs(minmax.first));
			absmax = std::max(absmax, std::abs(minmax.second));
			// Return
			return absmax;
		}

        __global__ void cu_scale(Vector3 *vf1, scalar sc, size_t N)

        void set_c_cross(const scalar & c, const Vector3 & a, const vectorfield & b, vectorfield & out)
        {
            int n = out.size();
            cu_set_c_cross<<<(n+1023)/1024, 1024>>>(c, a, b.data(), out.data(), n);
            cudaDeviceSynchronize();
        }

