 __device__ inline real4 DifVelocityRho(
 		const real3 & dist3,
 		const real_ & d,
-		const real_ & rSPH,
 		const real4 & velMasA,
 		const real3 & vel_XSPH_A,
 		const real4 & velMasB,

__device__ inline real3 DifVelocity_SSI_Lubrication(
				const real3 & dist3,
				const real_ & d,
				const real_ & rSPH,
				const real4 & velMasA,
				const real4 & velMasB) {
//printf("** DifVelocity_SSI_DEM\n");

	real_ derivRho = rhoPresMuA.x * velMasB.w / rhoPresMuB.x * dot(vel_XSPH_A - vel_XSPH_B, gradW);
//	real_ zeta = 0;//.05;//.1;
//	real_ derivRho = rhoPresMuA.x * velMasB.w * invrhoPresMuBx * (dot(vel_XSPH_A - vel_XSPH_B, gradW)
//			+ zeta * paramsD.HSML * (10 * paramsD.v_Max) * 2 * (rhoPresMuB.x / rhoPresMuA.x - 1) * rAB_Dot_GradW_OverDist
//			);
	return R4(derivV, derivRho);

//	//*** Artificial viscosity type 1.3
//	real_ rAB_Dot_GradW = dot(dist3, gradW);
//	real3 derivV = -velMasB.w * (rhoPresMuA.y / (rhoPresMuA.x * rhoPresMuA.x) + rhoPresMuB.y / (rhoPresMuB.x * rhoPresMuB.x)) * gradW
//		+ velMasB.w / (rhoPresMuA.x * rhoPresMuB.x) * 2.0f * paramsD.mu0 * rAB_Dot_GradW / ( d * d + epsilonMutualDistance * paramsD.HSML * paramsD.HSML ) * R3(velMasA - velMasB);
//	return R4(derivV,
//		rhoPresMuA.x * velMasB.w / rhoPresMuB.x * dot(vel_XSPH_A - vel_XSPH_B, gradW));
}
