Pass correctly sized well-rate solution vectors to ifs_tpfa_press_flux().

The function computes a total flux at each perforation (connection), not
just one total flux per well.  Update documentation accordingly.
This commit is contained in:
Bård Skaflestad 2012-04-12 20:27:29 +02:00
parent 2065259764
commit 78dea6aa20

View File

@ -94,8 +94,9 @@ namespace Opm
/// \param[out] faceflux Will contain F signed face flux values. /// \param[out] faceflux Will contain F signed face flux values.
/// \param[out] well_bhp Will contain bhp values for each well passed /// \param[out] well_bhp Will contain bhp values for each well passed
/// in the constructor. /// in the constructor.
/// \param[out] well_rate Will contain rate values for each well passed /// \param[out] well_rate Will contain rate values for each
/// in the constructor. /// connection in all wells passed in the
/// constructor
void IncompTpfa::solve(const std::vector<double>& totmob, void IncompTpfa::solve(const std::vector<double>& totmob,
const std::vector<double>& omega, const std::vector<double>& omega,
const std::vector<double>& src, const std::vector<double>& src,
@ -139,7 +140,7 @@ namespace Opm
if(wells_ != NULL) { if(wells_ != NULL) {
well_bhp.resize(wells_->number_of_wells); well_bhp.resize(wells_->number_of_wells);
well_rate.resize(wells_->number_of_wells); well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]);
soln.well_flux = &well_rate[0]; soln.well_flux = &well_rate[0];
soln.well_press = &well_bhp[0]; soln.well_press = &well_bhp[0];
} }
@ -167,8 +168,9 @@ namespace Opm
/// \param[out] faceflux Will contain F signed face flux values. /// \param[out] faceflux Will contain F signed face flux values.
/// \param[out] well_bhp Will contain bhp values for each well passed /// \param[out] well_bhp Will contain bhp values for each well passed
/// in the constructor /// in the constructor
/// \param[out] well_rate Will contain rate values for each well passed /// \param[out] well_rate Will contain rate values for each
/// in the constructor /// connection in all wells passed in the
/// constructor
void IncompTpfa::solve(const std::vector<double>& totmob, void IncompTpfa::solve(const std::vector<double>& totmob,
const std::vector<double>& omega, const std::vector<double>& omega,
const std::vector<double>& src, const std::vector<double>& src,
@ -235,7 +237,7 @@ namespace Opm
if(wells_ != NULL) { if(wells_ != NULL) {
well_bhp.resize(wells_->number_of_wells); well_bhp.resize(wells_->number_of_wells);
well_rate.resize(wells_->number_of_wells); well_rate.resize(wells_->well_connpos[ wells_->number_of_wells ]);
soln.well_flux = &well_rate[0]; soln.well_flux = &well_rate[0];
soln.well_press = &well_bhp[0]; soln.well_press = &well_bhp[0];
} }