fixed porenetwork bug

This commit is contained in:
James E McClure 2018-04-26 11:03:22 -04:00
parent bfa4d61035
commit d1499dae44

View File

@ -208,12 +208,12 @@ int main(int argc, char **argv)
double zk = double(k) - z;
// value of s along center line {x=alpha*s, y = beta*s, z=gamma*s} that is closest to i,j,k
double s = (alpha*xi + beta*yj + gamma*zk)/(alpha*alpha + beta*beta + gamma*gamma);
double distance=0.f;
double distance=Averages.SDs(i,j,k);
if (s > length){
distance = radius - sqrt((xi-X)*(xi-X) + (yj-Y)*(yj-Y) + (zk-Z)*(zk-Z));
//distance = radius - sqrt((xi-X)*(xi-X) + (yj-Y)*(yj-Y) + (zk-Z)*(zk-Z));
}
else if (s<0){
distance = radius - sqrt((xi-x)*(xi-x) + (yj-y)*(yj-y) + (zk-z)*(zk-z));
//distance = radius - sqrt((xi-x)*(xi-x) + (yj-y)*(yj-y) + (zk-z)*(zk-z));
}
else{
double xs = alpha*s;