 		real3* flexSPH_MeshPos_LRF_D,
 		real3 * posRadD,
 		int* flexIdentifierD,
-		real_* flexParametricDist,
-		real_* ANCF_Beam_Length,
-		int* ANCF_NumNodes_Per_Beam,
-		real3 * ANCF_Nodes,
-		real3 * ANCF_Slopes) {
+		real_* flexParametricDistD,
+		real_* ANCF_Beam_LengthD,
+		int* ANCF_NumNodes_Per_BeamD,
+		real3 * ANCF_NodesD,
+		real3 * ANCF_SlopesD) {
 	uint index = blockIdx.x * blockDim.x + threadIdx.x;
 	if (index >= numFlex_SphMarkersD) {
 		return;
 	}
 	uint absMarkerIndex = index + startFlexMarkersD; // updatePortionD = [start, end] index of the update portion
-	real_ s = flexParametricDist[index];
+	real_ s = flexParametricDistD[index];
 	int flexBodyIndex = flexIdentifierD[index];
-	real_ l = ANCF_Beam_Length[flexBodyIndex];
-	int nNodes = ANCF_NumNodes_Per_Beam[flexBodyIndex];
+	real_ l = ANCF_Beam_LengthD[flexBodyIndex];
+	int nNodes = ANCF_NumNodes_Per_BeamD[flexBodyIndex];
 
 	int indexOfClosestNode = int(s / l) * nNodes;
 	if (indexOfClosestNode == nNodes) indexOfClosestNode--;
 
-	real3 beamPointPos = Calc_ANCF_Point_Pos(ANCF_Nodes, ANCF_Slopes, indexOfClosestNode, s, l); //interpolation using ANCF beam, cubic hermit equation
+	real3 beamPointPos = Calc_ANCF_Point_Pos(ANCF_NodesD, ANCF_SlopesD, indexOfClosestNode, s, l); //interpolation using ANCF beam, cubic hermit equation
 
 	real3 dist3 = posRadD[absMarkerIndex] - beamPointPos;
 	flexSPH_MeshPos_LRF_D[index] = dist3;

		const int numRigidBodies,
		const int numFlexBodies,
		const int numFlex_SphMarkers,
		thrust::device_vector<real3> & ANCF_Nodes,
		thrust::device_vector<real3> & ANCF_Slopes,
		thrust::device_vector<real3> & ANCF_VelNodes,
		thrust::device_vector<real3> & ANCF_VelSlopes,
		thrust::device_vector<int2> & ANCF_ReferenceArrayNodesOnBeams,
		thrust::device_vector<int> & ANCF_NumNodes_Per_Beam,
		thrust::device_vector<int> & ANCF_NumMarkers_Per_Beam,
		thrust::device_vector<int> & ANCF_NumNodesMultMarkers_Per_Beam,
		thrust::device_vector<int> & ANCF_NumNodesMultMarkers_Per_Beam_Cumul,

		const thrust::device_vector<int> & flexIdentifierD,
		const thrust::device_vector<real3> & flexSPH_MeshPos_LRF_D,
		const thrust::device_vector<real_> & flexParametricDist,
		const thrust::device_vector<real_> & ANCF_Beam_Length,
		const thrust::host_vector<int3> & referenceArray,

		SimParams paramsH,

			R3CAST(flexNodesForcesAllMarkers1),
			R3CAST(flexNodesForcesAllMarkers2),
			I1CAST(flexIdentifierD),
			I1CAST(ANCF_NumMarkers_Per_BeamD),
			I1CAST(ANCF_NumMarkers_Per_Beam_cumulD),
			I1CAST(ANCF_NumNodesMultMarkers_Per_Beam_CumulD),
			R1CAST(flexParametricDistD),
			R4CAST(derivVelRhoD),
			markerMass);

