Skip to content

Commit

Permalink
Remove functions to filter connections
Browse files Browse the repository at this point in the history
  • Loading branch information
joakim-hove committed Oct 1, 2019
1 parent 04eb337 commit 45bb067
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 42 deletions.
1 change: 0 additions & 1 deletion opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ namespace Opm
Will remove all completions which are connected to cell which is not
active. Will scan through all wells and all timesteps.
*/
void filterConnections(const EclipseGrid& grid);
size_t size() const;

void applyAction(size_t reportStep, const Action::ActionX& action, const Action::Result& result);
Expand Down
1 change: 0 additions & 1 deletion opm/parser/eclipse/EclipseState/Schedule/Well/Well2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,6 @@ class Well2 {
bool handleCOMPLUMP(const DeckRecord& record);
bool handleWPIMULT(const DeckRecord& record);

void filterConnections(const EclipseGrid& grid);
void switchToInjector();
void switchToProducer();
ProductionControls productionControls(const SummaryState& st) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ namespace Opm {

const_iterator begin() const { return this->m_connections.begin(); }
const_iterator end() const { return this->m_connections.end(); }
void filter(const EclipseGrid& grid);
bool allConnectionsShut() const;
/// Order connections irrespective of input order.
/// The algorithm used is the following:
Expand Down
26 changes: 0 additions & 26 deletions src/opm/parser/eclipse/EclipseState/Schedule/Schedule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2483,32 +2483,6 @@ void Schedule::handleGRUPTREE( const DeckKeyword& keyword, size_t currentStep, c
}


void Schedule::filterConnections(const EclipseGrid& grid) {
for (auto& dynamic_pair : this->wells_static) {
auto& dynamic_state = dynamic_pair.second;
for (auto& well_pair : dynamic_state.unique()) {
if (well_pair.second)
well_pair.second->filterConnections(grid);
}
}

for (auto& dynamic_pair : this->wells_static) {
auto& dynamic_state = dynamic_pair.second;
for (auto& well_pair : dynamic_state.unique()) {
if (well_pair.second)
well_pair.second->filterConnections(grid);
}
}

for (auto& dynamic_pair : this->wells_static) {
auto& dynamic_state = dynamic_pair.second;
for (auto& well_pair : dynamic_state.unique()) {
if (well_pair.second)
well_pair.second->filterConnections(grid);
}
}
}

const VFPProdTable& Schedule::getVFPProdTable(int table_id, size_t timeStep) const {
const auto pair = vfpprod_tables.find(table_id);
if (pair == vfpprod_tables.end())
Expand Down
5 changes: 0 additions & 5 deletions src/opm/parser/eclipse/EclipseState/Schedule/Well/Well2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,11 +621,6 @@ bool Well2::handleWELSEGS(const DeckKeyword& keyword) {
return false;
}

void Well2::filterConnections(const EclipseGrid& grid) {
this->connections->filter(grid);
}


std::size_t Well2::firstTimeStep() const {
return this->init_step;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,4 @@ inline std::array< size_t, 3> directionIndices(const Opm::Connection::Direction
return !( *this == rhs );
}


void WellConnections::filter(const EclipseGrid& grid) {
auto new_end = std::remove_if(m_connections.begin(),
m_connections.end(),
[&grid](const Connection& c) { return !grid.cellActive(c.getI(), c.getJ(), c.getK()); });
this->num_removed += std::distance(new_end, m_connections.end());
m_connections.erase(new_end, m_connections.end());
}
}

0 comments on commit 45bb067

Please sign in to comment.