WellConnections: Initialise Head in Copy Constructor
This commit ensures that the data members 'headI' and 'headJ' are
properly initialised in the constructor
WellConnections(const WellConnections&, const EclipseGrid&)
which powers the implementation of
Well::getActiveConnections()
This commit is contained in:
@@ -94,9 +94,10 @@ namespace Opm {
|
||||
const double segDistEnd= 0.0,
|
||||
const bool defaultSatTabId = true);
|
||||
|
||||
std::vector< Connection > m_connections;
|
||||
size_t findClosestConnection(int oi, int oj, double oz, size_t start_pos);
|
||||
|
||||
int headI, headJ;
|
||||
std::vector< Connection > m_connections;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -123,7 +123,10 @@ namespace {
|
||||
|
||||
|
||||
|
||||
WellConnections::WellConnections(const WellConnections& src, const EclipseGrid& grid) {
|
||||
WellConnections::WellConnections(const WellConnections& src, const EclipseGrid& grid) :
|
||||
headI(src.headI),
|
||||
headJ(src.headJ)
|
||||
{
|
||||
for (const auto& c : src) {
|
||||
if (grid.cellActive(c.getI(), c.getJ(), c.getK()))
|
||||
this->add(c);
|
||||
|
||||
Reference in New Issue
Block a user