Bugfix in CompressibleTpfa for gravity case.

Gravity acceleration should be a factor in the face gravity potential.
This commit is contained in:
Atgeirr Flø Rasmussen 2012-07-19 14:45:15 +02:00
parent eb7d46accf
commit 937b85e88f

View File

@ -341,7 +341,7 @@ namespace Opm
const double depth_diff = face_depth - grid_.cell_centroids[c[j]*dim + dim - 1];
props_.density(1, &cell_A_[np*np*c[j]], &gravcontrib[j][0]);
for (int p = 0; p < np; ++p) {
gravcontrib[j][p] *= depth_diff;
gravcontrib[j][p] *= depth_diff*grav;
}
} else {
std::fill(gravcontrib[j].begin(), gravcontrib[j].end(), 0.0);