 
 	// Some for loop
 
-	upTriangle <<< blk,32 >>>(d_IC,d_right,d_left);
+	upTriangle <<< bks,32 >>>(d_IC,d_right,d_left);
 
 
-	downTriangle <<< blk,32 >>>(d_IC2,d_IC);
+	downTriangle <<< bks,32 >>>(d_IC,d_right,d_left);
 
 	// Some condition about when to stop or copy memory.
 

	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++)
	{

	__shared__ REAL sR[32];
	__shared__ REAL sL[32];

	unsigned int gid = blockDim.x * blockIdx.x + threadIdx.x; //Global Thread ID
	unsigned int tid = threadIdx.x;

	temper[tid] = IC[gid];
	__syncthreads();
	int itr = -1;

	for (unsigned int k = 1; k<16; k++)
	{
		int sw = (k & 1);
		int shft = 32*(sw*2-1);

		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();

		if (sw)
		{
			sL[k+itr] = temper[k-1];
