mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Rename well filter -> not_on_process_()
This commit is contained in:
committed by
Bård Skaflestad
parent
9662d4019e
commit
e2d75b608b
@@ -301,7 +301,7 @@ namespace Opm {
|
|||||||
|
|
||||||
std::vector<bool> is_cell_perforated_;
|
std::vector<bool> is_cell_perforated_;
|
||||||
|
|
||||||
std::function<bool(const Well&)> is_shut_or_defunct_;
|
std::function<bool(const Well&)> not_on_process_;
|
||||||
|
|
||||||
void initializeWellProdIndCalculators();
|
void initializeWellProdIndCalculators();
|
||||||
void initializeWellPerfData();
|
void initializeWellPerfData();
|
||||||
@@ -373,8 +373,8 @@ namespace Opm {
|
|||||||
/// \brief Get the wells of our partition that are not shut.
|
/// \brief Get the wells of our partition that are not shut.
|
||||||
/// \param timeStepIdx The index of the time step.
|
/// \param timeStepIdx The index of the time step.
|
||||||
/// \param[out] globalNumWells the number of wells globally.
|
/// \param[out] globalNumWells the number of wells globally.
|
||||||
std::vector< Well > getLocalNonshutWells(const int timeStepIdx,
|
std::vector< Well > getLocalWells(const int timeStepIdx,
|
||||||
int& globalNumWells) const;
|
int& globalNumWells) const;
|
||||||
|
|
||||||
/// \brief Create the parallel well information
|
/// \brief Create the parallel well information
|
||||||
/// \param localWells The local wells from ECL schedule
|
/// \param localWells The local wells from ECL schedule
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ namespace Opm {
|
|||||||
parallel_well_info_.assign(parallel_wells.begin(), parallel_wells.end());
|
parallel_well_info_.assign(parallel_wells.begin(), parallel_wells.end());
|
||||||
const auto& pwell_info = parallel_well_info_;
|
const auto& pwell_info = parallel_well_info_;
|
||||||
std::size_t numProcs = ebosSimulator.gridView().comm().size();
|
std::size_t numProcs = ebosSimulator.gridView().comm().size();
|
||||||
is_shut_or_defunct_ = [&pwell_info, numProcs](const Well& well) {
|
not_on_process_ = [&pwell_info, numProcs](const Well& well) {
|
||||||
if (well.getStatus() == Well::Status::SHUT)
|
if (well.getStatus() == Well::Status::SHUT)
|
||||||
return true;
|
return true;
|
||||||
if (numProcs == 1u)
|
if (numProcs == 1u)
|
||||||
@@ -214,11 +214,11 @@ namespace Opm {
|
|||||||
template<typename TypeTag>
|
template<typename TypeTag>
|
||||||
std::vector< Well >
|
std::vector< Well >
|
||||||
BlackoilWellModel<TypeTag>::
|
BlackoilWellModel<TypeTag>::
|
||||||
getLocalNonshutWells(const int timeStepIdx, int& globalNumWells) const
|
getLocalWells(const int timeStepIdx, int& globalNumWells) const
|
||||||
{
|
{
|
||||||
auto w = schedule().getWells(timeStepIdx);
|
auto w = schedule().getWells(timeStepIdx);
|
||||||
globalNumWells = w.size();
|
globalNumWells = w.size();
|
||||||
w.erase(std::remove_if(w.begin(), w.end(), is_shut_or_defunct_), w.end());
|
w.erase(std::remove_if(w.begin(), w.end(), not_on_process_), w.end());
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -252,8 +252,8 @@ namespace Opm {
|
|||||||
const Grid& grid = ebosSimulator_.vanguard().grid();
|
const Grid& grid = ebosSimulator_.vanguard().grid();
|
||||||
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
||||||
int globalNumWells = 0;
|
int globalNumWells = 0;
|
||||||
// Make wells_ecl_ contain only this partition's non-shut wells.
|
// Make wells_ecl_ contain only this partition's wells.
|
||||||
wells_ecl_ = getLocalNonshutWells(timeStepIdx, globalNumWells);
|
wells_ecl_ = getLocalWells(timeStepIdx, globalNumWells);
|
||||||
local_parallel_well_info_ = createLocalParallelWellInfo(wells_ecl_);
|
local_parallel_well_info_ = createLocalParallelWellInfo(wells_ecl_);
|
||||||
|
|
||||||
// The well state initialize bhp with the cell pressure in the top cell.
|
// The well state initialize bhp with the cell pressure in the top cell.
|
||||||
@@ -621,8 +621,8 @@ namespace Opm {
|
|||||||
const int report_step = std::max(eclState().getInitConfig().getRestartStep() - 1, 0);
|
const int report_step = std::max(eclState().getInitConfig().getRestartStep() - 1, 0);
|
||||||
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
const auto& summaryState = ebosSimulator_.vanguard().summaryState();
|
||||||
int globalNumWells = 0;
|
int globalNumWells = 0;
|
||||||
// Make wells_ecl_ contain only this partition's non-shut wells.
|
// wells_ecl_ should only contain wells on this processor.
|
||||||
wells_ecl_ = getLocalNonshutWells(report_step, globalNumWells);
|
wells_ecl_ = getLocalWells(report_step, globalNumWells);
|
||||||
local_parallel_well_info_ = createLocalParallelWellInfo(wells_ecl_);
|
local_parallel_well_info_ = createLocalParallelWellInfo(wells_ecl_);
|
||||||
|
|
||||||
this->initializeWellProdIndCalculators();
|
this->initializeWellProdIndCalculators();
|
||||||
|
|||||||
Reference in New Issue
Block a user