Minor change to computeWDP() interface.

This commit is contained in:
Atgeirr Flø Rasmussen 2012-04-24 13:48:00 +02:00
parent b41dd9088c
commit 8c1f9be1c3
2 changed files with 5 additions and 3 deletions

View File

@ -405,10 +405,12 @@ namespace Opm
}
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
const std::vector<double>& densities, std::vector<double>& wdp, bool per_grid_cell)
const double* densities, std::vector<double>& wdp, bool per_grid_cell)
{
const size_t np = densities.size();
const int nw = wells.number_of_wells;
const size_t np = per_grid_cell ?
saturations.size()/grid.number_of_cells
: saturations.size()/wells.well_connpos[nw];
// Simple for now:
for (int i = 0; i < nw; i++) {
double depth_ref = wells.depth_ref[i];

View File

@ -188,7 +188,7 @@ namespace Opm
/// \param[in] per_grid_cell Whether or not the saturations are per grid cell or per
/// well cell.
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
const std::vector<double>& densities, std::vector<double>& wdp, bool per_grid_cell = true);
const double* densities, std::vector<double>& wdp, bool per_grid_cell);
/// Computes (sums) the flow rate for each well.
/// \param[in] wells The wells for which the flow rate should be computed.