else
h[s+1]=0.5*(u[tid+1] + u[tid]);
//calculate coefficients
- double dtemp = (2*b[tid] - c[tid+1])+((c[tid+1] - c[tid])*(h[s+1] - u[tid]))/fmax(1e-10,(u[tid+1] - u[tid]));
+ double dtemp = (2*b[tid] - c[tid+1])+((c[tid+1] - c[tid])*
+ (h[s+1] - u[tid]))/ fmax(1e-10,(u[tid+1] - u[tid]));
alpha[s]=v[tid]; beta[s]=c[tid];
gamma[s]=(dtemp - c[tid])/(2*fmax(1e-10,(h[s+1] - u[tid])));
alpha[s+1]=v[tid] + c[tid]*(h[s+1] - u[tid]) +
(dtemp - c[tid])*(h[s+1] - u[tid])/2;
- gamma[s+1]=(c[tid+1] - dtemp)/(2*fmax(1e-10,(u[tid+1] - h[s+1])));
+ gamma[s+1]=(c[tid+1]-dtemp)/(2*fmax(1e-10,(u[tid+1]-h[s+1])));
beta[s+1]=dtemp;
}
tid += blockDim.x * gridDim.x; s = tid*2;