using absolute value when comparing the velocity

To decide if the value is out of range.
This commit is contained in:
Kai Bao 2015-06-05 15:23:55 +02:00
parent 312fc60d13
commit e217ca9928

View File

@ -1005,7 +1005,7 @@ namespace Opm {
return false; // failed in finding the solution. return false; // failed in finding the solution.
} }
}else{ }else{
if (water_vel[i] < maxShearVel) { if (std::abs(water_vel[i]) < maxShearVel) {
std::cout << " the veclocity is " << water_vel[i] << std::endl; std::cout << " the veclocity is " << water_vel[i] << std::endl;
std::cout << " max shear velocity is " << maxShearVel << std::endl; std::cout << " max shear velocity is " << maxShearVel << std::endl;
std::cerr << " something wrong happend in finding segment" << std::endl; std::cerr << " something wrong happend in finding segment" << std::endl;