Merge pull request #60 from atgeirr/master
A small collection of bugfixes
This commit is contained in:
@@ -398,10 +398,18 @@ namespace
|
||||
yv.push_back(table[k][i]);
|
||||
}
|
||||
}
|
||||
// Interpolate
|
||||
for (int i=0; i<int(indx.size()); ++i) {
|
||||
table[k][indx[i]] = linearInterpolationExtrap(xv, yv, x[i]);
|
||||
}
|
||||
if (xv.empty()) {
|
||||
// Nothing specified, the entire column is defaulted.
|
||||
// We insert zeros.
|
||||
for (int i=0; i<int(indx.size()); ++i) {
|
||||
table[k][indx[i]] = 0.0;
|
||||
}
|
||||
} else {
|
||||
// Interpolate
|
||||
for (int i=0; i<int(indx.size()); ++i) {
|
||||
table[k][indx[i]] = linearInterpolationExtrap(xv, yv, x[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1047,7 +1047,7 @@ struct GCONINJE : public SpecialBase
|
||||
gconinje_line.injector_type_ = readString(is);
|
||||
gconinje_line.control_mode_ = readString(is);
|
||||
std::vector<double> double_data(10, -1.0E20);
|
||||
const int num_to_read = 10;
|
||||
const int num_to_read = 4;
|
||||
int num_read = readDefaultedVectorData(is, double_data, num_to_read);
|
||||
gconinje_line.surface_flow_max_rate_ = double_data[0];
|
||||
gconinje_line.resv_flow_max_rate_ = double_data[1];
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Opm
|
||||
/// \return Array of P viscosity values.
|
||||
virtual const double* viscosity() const = 0;
|
||||
|
||||
/// Densities of fluid phases at surface conditions.
|
||||
/// Densities of fluid phases at reservoir conditions.
|
||||
/// \return Array of P density values.
|
||||
virtual const double* density() const = 0;
|
||||
|
||||
|
||||
@@ -485,8 +485,8 @@ namespace Opm
|
||||
// Optionally, check if well controls are satisfied.
|
||||
if (check_well_controls_) {
|
||||
Opm::computePhaseFlowRatesPerWell(*wells_,
|
||||
fractional_flows,
|
||||
well_state.perfRates(),
|
||||
fractional_flows,
|
||||
well_resflows_phase);
|
||||
std::cout << "Checking well conditions." << std::endl;
|
||||
// For testing we set surface := reservoir
|
||||
|
||||
@@ -553,6 +553,7 @@ namespace Opm
|
||||
{
|
||||
const int np = wells.number_of_phases;
|
||||
const int nw = wells.number_of_wells;
|
||||
ASSERT(int(flow_rates_per_well_cell.size()) == wells.well_connpos[nw]);
|
||||
phase_flow_per_well.resize(nw * np);
|
||||
for (int wix = 0; wix < nw; ++wix) {
|
||||
for (int phase = 0; phase < np; ++phase) {
|
||||
|
||||
Reference in New Issue
Block a user