diff --git a/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp b/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp index d5eddec51..5270f4358 100644 --- a/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp +++ b/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.hpp @@ -33,7 +33,12 @@ namespace Opm { public: + WellConnections(); WellConnections(int headI, int headJ); + WellConnections(int headI, int headJ, + size_t numRemoved, + const std::vector& connections); + // cppcheck-suppress noExplicitConstructor WellConnections(const WellConnections& src, const EclipseGrid& grid); void addConnection(int i, int j , int k , @@ -85,6 +90,11 @@ namespace Opm { bool operator==( const WellConnections& ) const; bool operator!=( const WellConnections& ) const; + int getHeadI() const; + int getHeadJ() const; + size_t getNumRemoved() const; + const std::vector& getConnections() const; + private: void addConnection(int i, int j , int k , int complnum, diff --git a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp index ce5e7f372..a70382021 100644 --- a/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp +++ b/src/opm/parser/eclipse/EclipseState/Schedule/Well/WellConnections.cpp @@ -115,6 +115,11 @@ inline std::array< size_t, 3> directionIndices(const Opm::Connection::Direction } // anonymous namespace + WellConnections::WellConnections() : + headI(0), headJ(0), num_removed(0) + { + } + WellConnections::WellConnections(int headIArg, int headJArg) : headI(headIArg), headJ(headJArg) @@ -122,6 +127,17 @@ inline std::array< size_t, 3> directionIndices(const Opm::Connection::Direction } + WellConnections::WellConnections(int headIArg, int headJArg, + size_t numRemoved, + const std::vector& connections) : + headI(headIArg), + headJ(headJArg), + num_removed(numRemoved), + m_connections(connections) + { + } + + WellConnections::WellConnections(const WellConnections& src, const EclipseGrid& grid) : headI(src.headI), @@ -505,4 +521,24 @@ inline std::array< size_t, 3> directionIndices(const Opm::Connection::Direction this->num_removed += std::distance(new_end, m_connections.end()); m_connections.erase(new_end, m_connections.end()); } + + + int WellConnections::getHeadI() const { + return headI; + } + + + int WellConnections::getHeadJ() const { + return headJ; + } + + + size_t WellConnections::getNumRemoved() const { + return num_removed; + } + + + const std::vector& WellConnections::getConnections() const { + return m_connections; + } }