 
 							flexParams,
 							numObjects,
-							float(tStep)/stepEnd,
-							delT);
+							realTime / (paramsH.tFinal),
+							currentParamsH.dT);
 		}
 		ApplyBoundary(posRadD, rhoPresMuD, posRigidD, ANCF_NodesD, ANCF_ReferenceArrayNodesOnBeamsD, numObjects);
 		//************


	FILE *outFileMultipleZones;

	real_ delT = paramsH.dT;
	int povRayCounter = 0;
	int stepEnd = int(paramsH.tFinal/paramsH.dT);//1.0e6;//2.4e6;//600000;//2.4e6 * (.02 * paramsH.sizeScale) / delT ; //1.4e6 * (.02 * paramsH.sizeScale) / delT ;//0.7e6 * (.02 * paramsH.sizeScale) / delT ;//0.7e6;//2.5e6; //200000;//10000;//50000;//100000;
	printf("stepEnd %d\n", stepEnd);

	real_ delTOrig = delT;
	real_ realTime = 0;

	int numPause =  .005 * paramsH.tFinal/paramsH.dT;
	int pauseRigidFlex = 10 * numPause;//numPause;
	printf("numPause %d\n", numPause);
	printf("pauseRigidFlex %d\n", pauseRigidFlex);
	SimParams paramsH_B = paramsH;
	paramsH_B.bodyForce4 = R4(0);
	paramsH_B.gravity = R3(0);

	SimParams currentParamsH = paramsH;

	int timeSlice = real_(stepEnd)/7;
	//for (int tStep = 0; tStep < 0; tStep ++) {
	for (int tStep = 0; tStep < stepEnd + 1; tStep++) {
		//************************************************
		//edit  since yu deleted cyliderRotOmegaJD

		thrust::device_vector<real3> ANCF_SlopesVelD2 = ANCF_SlopesVelD;

		//******** RK2
		ForceSPH(posRadD, velMasD, vel_XSPH_D, rhoPresMuD, bodyIndexD, derivVelRhoD, referenceArray, numObjects.numAllMarkers, currentParamsH, 0.5 * currentParamsH.dT); //?$ right now, it does not consider paramsH.gravity or other stuff on rigid bodies. they should be applied at rigid body solver
		UpdateFluid(posRadD2, velMasD2, vel_XSPH_D, rhoPresMuD2, derivVelRhoD, referenceArray, 0.5 * currentParamsH.dT); //assumes ...D2 is a copy of ...D
		//UpdateBoundary(posRadD2, velMasD2, rhoPresMuD2, derivVelRhoD, referenceArray, 0.5 * currentParamsH.dT);		//assumes ...D2 is a copy of ...D

		if (realTime > timePauseRigidFlex) {
			UpdateRigidBody(
					posRadD2, velMasD2,
					posRigidD2, posRigidCumulativeD2, velMassRigidD2, qD2, AD1_2, AD2_2, AD3_2, omegaLRF_D2,
					posRadD,
					posRigidD, posRigidCumulativeD, velMassRigidD, qD1, AD1, AD2, AD3, omegaLRF_D,
					derivVelRhoD, rigidIdentifierD,
					rigidSPH_MeshPos_LRF_D, referenceArray, jD1, jD2, jInvD1, jInvD2, flexParams.gravity, numObjects, realTime / (paramsH.tFinal), 0.5 * currentParamsH.dT);

			UpdateFlexibleBody(posRadD2, velMasD2,
					ANCF_NodesD2, ANCF_SlopesD2, ANCF_NodesVelD2, ANCF_SlopesVelD2,
