Don't compare floating point numbers for equality.

This commit is contained in:
Bård Skaflestad 2012-10-16 21:48:38 +02:00
parent b400397389
commit beae475787

View File

@ -218,7 +218,7 @@ namespace Opm
const double grav = gravity_ ? gravity_[dim - 1] : 0.0;
wellperf_wdp_.clear();
wellperf_wdp_.resize(np*nperf, 0.0);
if (grav == 0.0) {
if (not (std::abs(grav) > 0.0)) {
return;
}