Hello,
I am new to c, and the following is giving me some grief:
int i,j,ll,k;
double ddim,ddip,ddjm,ddjp,ddlm,ddlp;
for(i=1; i<(mx-1); i++){
for(j=1; j<(my-1); j++){
for(ll=1; ll<(mz-1); ll++){
ddim=0.5*k
ddip=0.5*k
ddjm=0.5*k
ddjp=0.5*k
ddlm=0.5*k
ddlp=0.5*k
Wijl(i,j,ll) = ((1.0/h_x)*(ddip) \
((1.0/h_x)*(ddim)) \
((1.0/h_y)*(ddjp)) \
((1.0/h_y)*(ddjm)) \
((1.0/h_z)*(ddlp)) \
((1.0/h_z)*(ddlm)) ;
}
}
}
I then compile this with gcc using python and scipy, passing it everything that is not initialized, but I know the problem is in the 1.0/h_x part of the code. If I compile basic c statements using python/gcc it works, so I am not having a python/gcc issue.
The error I am getting is: "error: ambiguous overload for 'operator/' in '1.0e+0 / h_x'
It seems like it is trying to do assignment overloading, and all I want to do is division!
Any help would be greatly appreciated! :)
Thanks,
Tyler