mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #5289 from akva2/wellstate_direct_comm
WellState: remove template parameters for comm
This commit is contained in:
commit
b847a2b532
@ -438,10 +438,10 @@ WellState::currentWellRates(const std::string& wellName) const
|
|||||||
return it->second.second;
|
return it->second.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Communication>
|
void WellState::
|
||||||
void WellState::gatherVectorsOnRoot(const std::vector<data::Connection>& from_connections,
|
gatherVectorsOnRoot(const std::vector<data::Connection>& from_connections,
|
||||||
std::vector<data::Connection>& to_connections,
|
std::vector<data::Connection>& to_connections,
|
||||||
const Communication& comm) const
|
const Parallel::Communication& comm) const
|
||||||
{
|
{
|
||||||
auto send = std::set<int>{};
|
auto send = std::set<int>{};
|
||||||
auto recv = std::set<int>{};
|
auto recv = std::set<int>{};
|
||||||
@ -836,8 +836,7 @@ void WellState::updateStatus(int well_index, WellStatus status)
|
|||||||
ws.updateStatus(status);
|
ws.updateStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Comm>
|
void WellState::communicateGroupRates(const Parallel::Communication& comm)
|
||||||
void WellState::communicateGroupRates(const Comm& comm)
|
|
||||||
{
|
{
|
||||||
// Compute the size of the data.
|
// Compute the size of the data.
|
||||||
std::size_t sz = 0;
|
std::size_t sz = 0;
|
||||||
@ -885,8 +884,7 @@ void WellState::communicateGroupRates(const Comm& comm)
|
|||||||
assert(pos == sz);
|
assert(pos == sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Comm>
|
void WellState::updateGlobalIsGrup(const Parallel::Communication& comm)
|
||||||
void WellState::updateGlobalIsGrup(const Comm& comm)
|
|
||||||
{
|
{
|
||||||
this->global_well_info.value().clear();
|
this->global_well_info.value().clear();
|
||||||
for (std::size_t well_index = 0; well_index < this->size(); well_index++) {
|
for (std::size_t well_index = 0; well_index < this->size(); well_index++) {
|
||||||
@ -1025,7 +1023,4 @@ WellState::parallelWellInfo(std::size_t well_index) const
|
|||||||
return ws.parallel_info;
|
return ws.parallel_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
template void WellState::updateGlobalIsGrup<Parallel::Communication>(const Parallel::Communication& comm);
|
|
||||||
template void WellState::communicateGroupRates<Parallel::Communication>(const Parallel::Communication& comm);
|
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -21,10 +21,18 @@
|
|||||||
#ifndef OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
#ifndef OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||||
#define OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
#define OPM_WELLSTATEFULLYIMPLICITBLACKOIL_HEADER_INCLUDED
|
||||||
|
|
||||||
#include <opm/common/ErrorMacros.hpp>
|
#include <dune/common/version.hh>
|
||||||
|
#include <dune/common/parallel/mpihelper.hh>
|
||||||
|
|
||||||
#include <opm/core/props/BlackoilPhases.hpp>
|
#include <opm/core/props/BlackoilPhases.hpp>
|
||||||
|
|
||||||
|
#include <opm/common/ErrorMacros.hpp>
|
||||||
|
|
||||||
|
#include <opm/input/eclipse/Schedule/Events.hpp>
|
||||||
|
|
||||||
|
#include <opm/output/data/Wells.hpp>
|
||||||
|
|
||||||
|
#include <opm/simulators/utils/ParallelCommunication.hpp>
|
||||||
#include <opm/simulators/wells/ALQState.hpp>
|
#include <opm/simulators/wells/ALQState.hpp>
|
||||||
#include <opm/simulators/wells/GlobalWellInfo.hpp>
|
#include <opm/simulators/wells/GlobalWellInfo.hpp>
|
||||||
#include <opm/simulators/wells/PerfData.hpp>
|
#include <opm/simulators/wells/PerfData.hpp>
|
||||||
@ -33,13 +41,6 @@
|
|||||||
#include <opm/simulators/wells/SingleWellState.hpp>
|
#include <opm/simulators/wells/SingleWellState.hpp>
|
||||||
#include <opm/simulators/wells/WellContainer.hpp>
|
#include <opm/simulators/wells/WellContainer.hpp>
|
||||||
|
|
||||||
#include <opm/output/data/Wells.hpp>
|
|
||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/Events.hpp>
|
|
||||||
|
|
||||||
#include <dune/common/version.hh>
|
|
||||||
#include <dune/common/parallel/mpihelper.hh>
|
|
||||||
|
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
@ -129,10 +130,9 @@ public:
|
|||||||
this->well_rates.clear();
|
this->well_rates.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Communication>
|
|
||||||
void gatherVectorsOnRoot(const std::vector< data::Connection >& from_connections,
|
void gatherVectorsOnRoot(const std::vector< data::Connection >& from_connections,
|
||||||
std::vector< data::Connection >& to_connections,
|
std::vector< data::Connection >& to_connections,
|
||||||
const Communication& comm) const;
|
const Parallel::Communication& comm) const;
|
||||||
|
|
||||||
data::Wells
|
data::Wells
|
||||||
report(const int* globalCellIdxMap,
|
report(const int* globalCellIdxMap,
|
||||||
@ -150,11 +150,9 @@ public:
|
|||||||
const std::vector<double>& perforation_rates, const int np, const int segment, std::vector<double>& segment_rates);
|
const std::vector<double>& perforation_rates, const int np, const int segment, std::vector<double>& segment_rates);
|
||||||
|
|
||||||
|
|
||||||
template<class Comm>
|
void communicateGroupRates(const Parallel::Communication& comm);
|
||||||
void communicateGroupRates(const Comm& comm);
|
|
||||||
|
|
||||||
template<class Comm>
|
void updateGlobalIsGrup(const Parallel::Communication& comm);
|
||||||
void updateGlobalIsGrup(const Comm& comm);
|
|
||||||
|
|
||||||
bool isInjectionGrup(const std::string& name) const {
|
bool isInjectionGrup(const std::string& name) const {
|
||||||
return this->global_well_info.value().in_injecting_group(name);
|
return this->global_well_info.value().in_injecting_group(name);
|
||||||
|
Loading…
Reference in New Issue
Block a user