 	GaussQuadrature GQ;
 	IntitializeGaussQuadrature(GQ);
 	//---------------------------------------------
+#if flexGPU
 	cutilSafeCall( cudaMemcpyToSymbolAsync(flexParamsD, &flexParams, sizeof(ANCF_Params)));
 	cutilSafeCall( cudaMemcpyToSymbolAsync(dTD, &dT, sizeof(real_)));
 	cutilSafeCall( cudaMemcpyToSymbolAsync(numFlexBodiesD, &numFlexBodies, sizeof(int))); //This can be updated in the future, to work with numObjectsD
 	cutilSafeCall( cudaMemcpyToSymbolAsync(GQD, &GQ, sizeof(GaussQuadrature))); //This can be updated in the future, to work with numObjects
-
+#else
+	flexParamsD = flexParams;
+	dTD = dT;
+	numFlexBodiesD = numFlexBodies;
+	GQD = GQ;
+#endif
 	//---------------------------------------------
 	//####### Calculate Forces
 	uint nBlock_FlexBodies;
 	uint nThreads_FlexBodies;
 	computeGridSize(numFlexBodies, 128, nBlock_FlexBodies, nThreads_FlexBodies);
 
-	CalcElasticForces<<<nBlock_FlexBodies, nThreads_FlexBodies>>>(
+	CalcElasticForcesD<<<nBlock_FlexBodies, nThreads_FlexBodies>>>(
 			R3CAST(flex_FSI_NodesForcesD1), R3CAST(flex_FSI_NodesForcesD2),
 			R3CAST(ANCF_NodesD), R3CAST(ANCF_SlopesD), R3CAST(ANCF_NodesVelD), R3CAST(ANCF_SlopesVelD),
 			I2CAST(ANCF_ReferenceArrayNodesOnBeamsD), R1CAST(ANCF_Beam_LengthD));
 	cudaThreadSynchronize();
-	CUT_CHECK_ERROR("Kernel execution failed: CalcElasticForces");
+	CUT_CHECK_ERROR("Kernel execution failed: CalcElasticForcesD");
 
 	int totalNumberOfFlexNodes = flex_FSI_NodesForcesD1.size();
 	thrust::device_vector<real3> ANCF_NodesAccD(totalNumberOfFlexNodes);

		// Add element forces to associated nodes
		Add_f_ToForces(flex_FSI_NodesForcesD1, flex_FSI_NodesForcesD2, -1, f_e, nodeIdx);
	}

}
//------------------------------------------------------------------------------
__global__ void SolveForAccD(
		real3 * ANCF_NodesAccD,
		real3 * ANCF_SlopesAccD,


		const real3 * ANCF_SlopesAccD,

		const int2 * ANCF_ReferenceArrayNodesOnBeamsD,
		const bool * ANCF_IsCantileverD,
		uint i
	)
{
	int2 nodesPortion = ANCF_ReferenceArrayNodesOnBeamsD[i];
	int2 nodesPortionAdjusted2 = nodesPortion;
	bool isCantilever = ANCF_IsCantileverD[i];
