 
 }
 
-__global__ void downTriangle(REAL *IC)
+__global__ void downTriangle(REAL *IC, REAL *right, REAL *left)
 {
 
+	__shared__ REAL temper[64];
+	unsigned int gid = blockDim.x * blockIdx.x + threadIdx.x; //Global Thread ID
+	unsigned int tid = threadIdx.x;
+
+	// k needs to first insert the right and left into the temper and then put the timestep in between them.
+	for (unsigned int k = 15; k>0; k--)
+	{
+
+		int sw = (k & 1);
+		int shft = 32*(sw*2-1);
+		temper[14-k+] =
+		temper[15-k]
+		temper[16+k]
+		temper[17+k]
+		// Well I reversed the loop so figure that out!
+		if (tid <= (32-k-1) && tid >= k)
+		{
+			temper[tid + (32*sw)] = fo * (IC[tid+(shft)-1] + IC[tid+(shft)+1]) + (1-2.*fo) * IC[tid+(shft)];
+		}
+
+		__syncthreads();
+
+
+	}
 
 
 }

	ofstream fwr;
	fwr.open("1DHeatEQResult.dat");
	// Write out x length and then delta x and then delta t.  First item of each line is timestamp.
	filewrite << LENX << " " << ds << " " << TS << " " << 0 <<endl;

	for (int k = 0; k<dv; k++)
	{

	REAL fou = TS*TH_DIFF/(ds*ds);

	REAL IC[dv];
	REAL *d_IC, *d_right, *d_left;

	for (int k = 0; k<dv; k++)
	{
