mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Minor change to computeWDP() interface.
This commit is contained in:
parent
b41dd9088c
commit
8c1f9be1c3
@ -405,10 +405,12 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
|
|
||||||
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
|
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 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:
|
// Simple for now:
|
||||||
for (int i = 0; i < nw; i++) {
|
for (int i = 0; i < nw; i++) {
|
||||||
double depth_ref = wells.depth_ref[i];
|
double depth_ref = wells.depth_ref[i];
|
||||||
|
@ -188,7 +188,7 @@ namespace Opm
|
|||||||
/// \param[in] per_grid_cell Whether or not the saturations are per grid cell or per
|
/// \param[in] per_grid_cell Whether or not the saturations are per grid cell or per
|
||||||
/// well cell.
|
/// well cell.
|
||||||
void computeWDP(const Wells& wells, const UnstructuredGrid& grid, const std::vector<double>& saturations,
|
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.
|
/// Computes (sums) the flow rate for each well.
|
||||||
/// \param[in] wells The wells for which the flow rate should be computed.
|
/// \param[in] wells The wells for which the flow rate should be computed.
|
||||||
|
Loading…
Reference in New Issue
Block a user