diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index ba25c05fb..e91d5729a 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -201,7 +201,6 @@ list (APPEND MAIN_SOURCE_FILES opm/simulators/wells/VFPProdProperties.cpp opm/simulators/wells/WellAssemble.cpp opm/simulators/wells/WellBhpThpCalculator.cpp - opm/simulators/wells/WellConnectionAuxiliaryModule.cpp opm/simulators/wells/WellConstraints.cpp opm/simulators/wells/WellConvergence.cpp opm/simulators/wells/WellFilterCake.cpp diff --git a/opm/simulators/wells/WellConnectionAuxiliaryModule.cpp b/opm/simulators/wells/WellConnectionAuxiliaryModule.cpp deleted file mode 100644 index dd65295ea..000000000 --- a/opm/simulators/wells/WellConnectionAuxiliaryModule.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* - Copyright 2017 Dr. Blatt - HPC-Simulation-Software & Services - Copyright 2017 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OPM is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#include -#include - -#include - -#include -#include -#include - -#include - -namespace Opm -{ - -WellConnectionAuxiliaryModuleGeneric:: -WellConnectionAuxiliaryModuleGeneric(const Schedule& schedule, - const Dune::CpGrid& grid) -{ - // Create cartesian to compressed mapping - const auto& globalCell = grid.globalCell(); - const auto& cartesianSize = grid.logicalCartesianSize(); - - auto size = cartesianSize[0] * cartesianSize[1] * cartesianSize[2]; - - std::vector cartesianToCompressed(size, -1); - auto begin = globalCell.begin(); - - for (auto cell = begin, end = globalCell.end(); cell != end; ++cell) - { - cartesianToCompressed[ *cell ] = cell - begin; - } - - const auto& schedule_wells = schedule.getWellsatEnd(); - wells_.reserve(schedule_wells.size()); - - // initialize the additional cell connections introduced by wells. - for (const auto& well : schedule_wells) - { - std::vector compressed_well_perforations; - // All possible completions of the well - const auto& completionSet = well.getConnections(); - compressed_well_perforations.reserve(completionSet.size()); - - for (const auto& completion : completionSet) - { - int compressed_idx = cartesianToCompressed[completion.global_index()]; - if (compressed_idx >= 0) // Ignore completions in inactive/remote cells. - { - compressed_well_perforations.push_back(compressed_idx); - } - } - - if (!compressed_well_perforations.empty()) - { - std::sort(compressed_well_perforations.begin(), - compressed_well_perforations.end()); - - wells_.push_back(compressed_well_perforations); - } - } -} - -} // end namespace Opm diff --git a/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp b/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp index f07b252eb..89fea0072 100644 --- a/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp +++ b/opm/simulators/wells/WellConnectionAuxiliaryModule.hpp @@ -32,19 +32,9 @@ namespace Opm class Schedule; -class WellConnectionAuxiliaryModuleGeneric -{ -protected: - WellConnectionAuxiliaryModuleGeneric(const Schedule& schedule, - const Dune::CpGrid& grid); - - std::vector > wells_; -}; - template class WellConnectionAuxiliaryModule : public BaseAuxiliaryModule - , private WellConnectionAuxiliaryModuleGeneric { using GlobalEqVector = GetPropType; using SparseMatrixAdapter = GetPropType; @@ -56,7 +46,6 @@ public: WellConnectionAuxiliaryModule(const Schedule& schedule, const Dune::CpGrid& grid) - : WellConnectionAuxiliaryModuleGeneric(schedule, grid) { } @@ -68,12 +57,6 @@ public: void addNeighbors(std::vector& neighbors) const { - for (const auto& well_perforations : wells_) - { - for (const auto& perforation : well_perforations) - neighbors[perforation].insert(well_perforations.begin(), - well_perforations.end()); - } } void applyInitial()