 						flexParams,
 						float(tStep)/stepEnd,
 						delT);
-
-//		ApplyBoundary(posRadD, rhoPresMuD, numAllMarkers, posRigidD, numRigidBodies, ANCF_NodesD, ANCF_ReferenceArrayNodesOnBeamsD, numFlexBodies);
+		ApplyBoundary(posRadD, rhoPresMuD, numAllMarkers, posRigidD, numRigidBodies, ANCF_NodesD, ANCF_ReferenceArrayNodesOnBeamsD, numFlexBodies);
 		//************
 
 
 
 
-//			/* post_process for Segre-Silberberg */ goes before ApplyBoundary
-//			if(tStep >= 0) {
-//				real2 channelCenter = .5 * R2(paramsH.cMax.y + paramsH.cMin.y, paramsH.cMax.z + paramsH.cMin.z);
-//				FindPassesFromTheEnd(posRigidD, distributionD, numRigidBodies, channelCenter, channelRadius, numberOfSections);
-//			}
+					//			/* post_process for Segre-Silberberg */ goes before ApplyBoundary
+					//			if(tStep >= 0) {
+					//				real2 channelCenter = .5 * R2(paramsH.cMax.y + paramsH.cMin.y, paramsH.cMax.z + paramsH.cMin.z);
+					//				FindPassesFromTheEnd(posRigidD, distributionD, numRigidBodies, channelCenter, channelRadius, numberOfSections);
+					//			}
 
 
 

						ANCF_ReferenceArrayNodesOnBeamsD,
						ANCF_NumMarkers_Per_BeamD,
						ANCF_NumMarkers_Per_Beam_CumulD,
				//		thrust::device_vector<int> & ANCF_NumNodesMultMarkers_Per_BeamD,
						ANCF_NumNodesMultMarkers_Per_Beam_CumulD,

						flexIdentifierD,

								flexParams,
								float(tStep)/stepEnd,
								0.5 * delT);
		ApplyBoundary(posRadD2, rhoPresMuD2, numAllMarkers, posRigidD2, numRigidBodies, ANCF_NodesD2, ANCF_ReferenceArrayNodesOnBeamsD, numFlexBodies);
		//*****
		ForceSPH(posRadD2, velMasD2, vel_XSPH_D, rhoPresMuD2, bodyIndexD, derivVelRhoD, referenceArray, numAllMarkers, paramsH, delT);
		UpdateFluid(posRadD, velMasD, vel_XSPH_D, rhoPresMuD, derivVelRhoD, referenceArray, delT);
		//UpdateBoundary(posRadD, velMasD, rhoPresMuD, derivVelRhoD, referenceArray, delT);
		UpdateRigidBody(posRadD, velMasD, posRigidD, posRigidCumulativeD, velMassRigidD, qD1, AD1, AD2, AD3, omegaLRF_D, derivVelRhoD, rigidIdentifierD,
				rigidSPH_MeshPos_LRF_D, referenceArray, jD1, jD2, jInvD1, jInvD2, paramsH, numRigidBodies, startRigidMarkers, numRigid_SphMarkers, float(tStep)/stepEnd, delT);
		UpdateFlexibleBody(posRadD, velMasD,
				ANCF_NodesD, ANCF_SlopesD, ANCF_NodesVelD, ANCF_SlopesVelD,
				derivVelRhoD,
