I am getting the compile time error message
“expression must contain pointer-to-object type”
and can find nothing wrong.
The statement the message refers to is
float h,dwdx, rho_j,myp,myrho;
__device__ float p[NTOTAL];
int j;
h = -dwdx*(myp/(myrho*myrho) + p[j]/(rho_j*rho_j));