Fixed even more warnings

This commit is contained in:
babrodtk 2015-09-02 13:55:46 +02:00
parent 221d1a3e92
commit 96e1a89abe
4 changed files with 14 additions and 14 deletions

View File

@ -48,18 +48,18 @@ namespace Opm
// Copy data // Copy data
const std::vector<double>& press = pvdoTable.getPressureColumn(); const std::vector<double>& press = pvdoTable.getPressureColumn();
const std::vector<double>& b = pvdoTable.getFormationFactorColumn(); const std::vector<double>& b_var = pvdoTable.getFormationFactorColumn();
const std::vector<double>& visc = pvdoTable.getViscosityColumn(); const std::vector<double>& visc = pvdoTable.getViscosityColumn();
const int sz = b.size(); const int sz = b_var.size();
std::vector<double> inverseB(sz); std::vector<double> inverseB(sz);
for (int i = 0; i < sz; ++i) { for (int i = 0; i < sz; ++i) {
inverseB[i] = 1.0 / b[i]; inverseB[i] = 1.0 / b_var[i];
} }
std::vector<double> inverseBmu(sz); std::vector<double> inverseBmu(sz);
for (int i = 0; i < sz; ++i) { for (int i = 0; i < sz; ++i) {
inverseBmu[i] = 1.0 / (b[i] * visc[i]); inverseBmu[i] = 1.0 / (b_var[i] * visc[i]);
} }
b_[regionIdx] = NonuniformTableLinear<double>(press, inverseB); b_[regionIdx] = NonuniformTableLinear<double>(press, inverseB);

View File

@ -54,12 +54,12 @@ namespace Opm
// Copy data // Copy data
const std::vector<double> &press = pvdoTable.getPressureColumn(); const std::vector<double> &press = pvdoTable.getPressureColumn();
const std::vector<double> &B = pvdoTable.getFormationFactorColumn(); const std::vector<double> &B_var = pvdoTable.getFormationFactorColumn();
const std::vector<double> &visc = pvdoTable.getViscosityColumn(); const std::vector<double> &visc = pvdoTable.getViscosityColumn();
std::vector<double> B_inv(numRows); std::vector<double> B_inv(numRows);
for (int i = 0; i < numRows; ++i) { for (int i = 0; i < numRows; ++i) {
B_inv[i] = 1.0 / B[i]; B_inv[i] = 1.0 / B_var[i];
} }
buildUniformMonotoneTable(press, B_inv, numSamples, b_[regionIdx]); buildUniformMonotoneTable(press, B_inv, numSamples, b_[regionIdx]);

View File

@ -110,15 +110,15 @@ namespace Opm
undersat_oil_tables_[pvtTableIdx][i][0].push_back(pressure); undersat_oil_tables_[pvtTableIdx][i][0].push_back(pressure);
double compr = (1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j]-1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j-1]) double compr = (1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j]-1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j-1])
/ (0.5*(1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j]+1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j-1])); / (0.5*(1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j]+1.0/undersat_oil_tables_[pvtTableIdx][iNext][1][j-1]));
double B = (1.0/undersat_oil_tables_[pvtTableIdx][i][1].back())*(1.0+0.5*compr)/(1.0-0.5*compr); double B_var = (1.0/undersat_oil_tables_[pvtTableIdx][i][1].back())*(1.0+0.5*compr)/(1.0-0.5*compr);
undersat_oil_tables_[pvtTableIdx][i][1].push_back(1.0/B); undersat_oil_tables_[pvtTableIdx][i][1].push_back(1.0/B_var);
double visc = (undersat_oil_tables_[pvtTableIdx][iNext][2][j]-undersat_oil_tables_[pvtTableIdx][iNext][2][j-1]) double visc = (undersat_oil_tables_[pvtTableIdx][iNext][2][j]-undersat_oil_tables_[pvtTableIdx][iNext][2][j-1])
/ (0.5*(undersat_oil_tables_[pvtTableIdx][iNext][2][j]+undersat_oil_tables_[pvtTableIdx][iNext][2][j-1])); / (0.5*(undersat_oil_tables_[pvtTableIdx][iNext][2][j]+undersat_oil_tables_[pvtTableIdx][iNext][2][j-1]));
double mu = (undersat_oil_tables_[pvtTableIdx][i][2].back())*(1.0+0.5*visc)/(1.0-0.5*visc); double mu_var = (undersat_oil_tables_[pvtTableIdx][i][2].back())*(1.0+0.5*visc)/(1.0-0.5*visc);
undersat_oil_tables_[pvtTableIdx][i][2].push_back(mu); undersat_oil_tables_[pvtTableIdx][i][2].push_back(mu_var);
// A try to expolate the 1/BMu with the expolated mu and B // A try to expolate the 1/BMu with the expolated mu and B
double inverseBMu = 1.0 / (B*mu); double inverseBMu = 1.0 / (B_var*mu_var);
undersat_oil_tables_[pvtTableIdx][i][3].push_back(inverseBMu); undersat_oil_tables_[pvtTableIdx][i][3].push_back(inverseBMu);
} }

View File

@ -176,18 +176,18 @@ BOOST_AUTO_TEST_CASE(cellAreas)
BOOST_AUTO_TEST_CASE(cellCenters) BOOST_AUTO_TEST_CASE(cellCenters)
{ {
double cellCenters[] = { double cellCenters_var[] = {
-1./3., 0.0, /* cell 0 */ -1./3., 0.0, /* cell 0 */
1./2., 0.0, /* cell 1 */ 1./2., 0.0, /* cell 1 */
}; };
BOOST_REQUIRE (sizeof(cellCenters)/sizeof(cellCenters[0]) == BOOST_REQUIRE (sizeof(cellCenters_var)/sizeof(cellCenters_var[0]) ==
g->number_of_cells * g->dimensions); g->number_of_cells * g->dimensions);
for (int cell = 0; cell < g->number_of_cells; ++cell) for (int cell = 0; cell < g->number_of_cells; ++cell)
{ {
for (int dim = 0; dim < g->dimensions; ++dim) for (int dim = 0; dim < g->dimensions; ++dim)
{ {
BOOST_REQUIRE_CLOSE (g->cell_centroids[cell*g->dimensions+dim], BOOST_REQUIRE_CLOSE (g->cell_centroids[cell*g->dimensions+dim],
cellCenters[cell*g->dimensions+dim], 0.001); cellCenters_var[cell*g->dimensions+dim], 0.001);
} }
} }
} }