 	thrust::device_vector<int> ANCF_NumMarkers_Per_Beam_CumulD(numFlexBodies);
 	thrust::device_vector<int> ANCF_NumNodesMultMarkers_Per_BeamD(numFlexBodies);
 	thrust::device_vector<int> ANCF_NumNodesMultMarkers_Per_Beam_CumulD(numFlexBodies);
-	thrust::device_vector<int2> flexMapEachMarkerOnAllBeamNodes(0);
+	thrust::device_vector<int2> flexMapEachMarkerOnAllBeamNodesD(0);
 
 	thrust::device_vector<int> dummySum(flexIdentifierD.size());
 	thrust::device_vector<int> dummyIdentifier(0);

	Calc_NumNodesMultMarkers_Per_Beam(ANCF_NumNodesMultMarkers_Per_BeamD, ANCF_NumMarkers_Per_BeamD, ANCF_ReferenceArrayNodesOnBeams, numFlexBodies);
	thrust::exclusive_scan(ANCF_NumNodesMultMarkers_Per_BeamD.begin(), ANCF_NumNodesMultMarkers_Per_BeamD.end(), ANCF_NumNodesMultMarkers_Per_Beam_CumulD());

	Calc_mapEachMarkerOnAllBeamNodes_IdentifierD(ANCF_NumNodesMultMarkers_Per_BeamD, ANCF_NumMarkers_Per_BeamD, ANCF_ReferenceArrayNodesOnBeams, numFlexBodies);

	//*******************


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

		const thrust::device_vector<int> & flexIdentifierD,
		const thrust::device_vector<int2> & flexMapEachMarkerOnAllBeamNodesD,
		const thrust::device_vector<real3> & flexSPH_MeshPos_LRF_D,
		const thrust::device_vector<real_> & flexParametricDistD,
		const thrust::device_vector<real_> & ANCF_Beam_LengthD,
