mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
cosmetics
This commit is contained in:
parent
b7a531b93a
commit
d9c801033a
@ -74,7 +74,9 @@ PackUnpackXConn::PackUnpackXConn(const bool isOwner,
|
|||||||
: local_ (local)
|
: local_ (local)
|
||||||
, global_(global)
|
, global_(global)
|
||||||
{
|
{
|
||||||
if (! isOwner) { return; }
|
if (! isOwner) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this->global_.insert(this->global_.end(),
|
this->global_.insert(this->global_.end(),
|
||||||
this->local_.begin(),
|
this->local_.begin(),
|
||||||
@ -170,7 +172,14 @@ void WellState::initSingleProducer(const Well& well,
|
|||||||
const auto& pu = this->phase_usage_;
|
const auto& pu = this->phase_usage_;
|
||||||
const double temp = 273.15 + 15.56;
|
const double temp = 273.15 + 15.56;
|
||||||
|
|
||||||
auto& ws = this->wells_.add(well.name(), SingleWellState{well.name(), well_info, true, pressure_first_connection, well_perf_data, pu, temp});
|
auto& ws = this->wells_.add(well.name(),
|
||||||
|
SingleWellState{well.name(),
|
||||||
|
well_info,
|
||||||
|
true,
|
||||||
|
pressure_first_connection,
|
||||||
|
well_perf_data,
|
||||||
|
pu,
|
||||||
|
temp});
|
||||||
|
|
||||||
// the rest of the code needs to executed even if ws.perf_data is empty
|
// the rest of the code needs to executed even if ws.perf_data is empty
|
||||||
// as this does not say anything for the whole well if it is distributed.
|
// as this does not say anything for the whole well if it is distributed.
|
||||||
@ -182,7 +191,6 @@ void WellState::initSingleProducer(const Well& well,
|
|||||||
ws.update_producer_targets(well, summary_state);
|
ws.update_producer_targets(well, summary_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WellState::initSingleInjector(const Well& well,
|
void WellState::initSingleInjector(const Well& well,
|
||||||
const ParallelWellInfo& well_info,
|
const ParallelWellInfo& well_info,
|
||||||
double pressure_first_connection,
|
double pressure_first_connection,
|
||||||
@ -192,7 +200,13 @@ void WellState::initSingleInjector(const Well& well,
|
|||||||
const auto& pu = this->phase_usage_;
|
const auto& pu = this->phase_usage_;
|
||||||
const double temp = well.temperature();
|
const double temp = well.temperature();
|
||||||
|
|
||||||
auto& ws = this->wells_.add(well.name(), SingleWellState{well.name(), well_info, false, pressure_first_connection, well_perf_data, pu, temp});
|
auto& ws = this->wells_.add(well.name(), SingleWellState{well.name(),
|
||||||
|
well_info,
|
||||||
|
false,
|
||||||
|
pressure_first_connection,
|
||||||
|
well_perf_data,
|
||||||
|
pu,
|
||||||
|
temp});
|
||||||
|
|
||||||
// the rest of the code needs to executed even if ws.perf_data is empty
|
// the rest of the code needs to executed even if ws.perf_data is empty
|
||||||
// as this does not say anything for the whole well if it is distributed.
|
// as this does not say anything for the whole well if it is distributed.
|
||||||
@ -204,8 +218,6 @@ void WellState::initSingleInjector(const Well& well,
|
|||||||
ws.update_injector_targets(well, summary_state);
|
ws.update_injector_targets(well, summary_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
||||||
const Well& well,
|
const Well& well,
|
||||||
const std::vector<PerforationData>& well_perf_data,
|
const std::vector<PerforationData>& well_perf_data,
|
||||||
@ -217,12 +229,14 @@ void WellState::initSingleWell(const std::vector<double>& cellPressures,
|
|||||||
pressure_first_connection = cellPressures[well_perf_data[0].cell_index];
|
pressure_first_connection = cellPressures[well_perf_data[0].cell_index];
|
||||||
pressure_first_connection = well_info.broadcastFirstPerforationValue(pressure_first_connection);
|
pressure_first_connection = well_info.broadcastFirstPerforationValue(pressure_first_connection);
|
||||||
|
|
||||||
if (well.isInjector())
|
if (well.isInjector()) {
|
||||||
this->initSingleInjector(well, well_info, pressure_first_connection, well_perf_data, summary_state);
|
this->initSingleInjector(well, well_info, pressure_first_connection,
|
||||||
else
|
well_perf_data, summary_state);
|
||||||
this->initSingleProducer(well, well_info, pressure_first_connection, well_perf_data, summary_state);
|
} else {
|
||||||
|
this->initSingleProducer(well, well_info, pressure_first_connection,
|
||||||
|
well_perf_data, summary_state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WellState::init(const std::vector<double>& cellPressures,
|
void WellState::init(const std::vector<double>& cellPressures,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
@ -234,8 +248,11 @@ void WellState::init(const std::vector<double>& cellPressures,
|
|||||||
const SummaryState& summary_state)
|
const SummaryState& summary_state)
|
||||||
{
|
{
|
||||||
// call init on base class
|
// call init on base class
|
||||||
this->base_init(cellPressures, wells_ecl, parallel_well_info, well_perf_data, summary_state);
|
this->base_init(cellPressures, wells_ecl, parallel_well_info,
|
||||||
this->global_well_info = std::make_optional<GlobalWellInfo>( schedule, report_step, wells_ecl );
|
well_perf_data, summary_state);
|
||||||
|
this->global_well_info = std::make_optional<GlobalWellInfo>(schedule,
|
||||||
|
report_step,
|
||||||
|
wells_ecl);
|
||||||
for (const auto& wname : schedule.wellNames(report_step))
|
for (const auto& wname : schedule.wellNames(report_step))
|
||||||
{
|
{
|
||||||
well_rates.insert({wname, std::make_pair(false, std::vector<double>(this->numPhases()))});
|
well_rates.insert({wname, std::make_pair(false, std::vector<double>(this->numPhases()))});
|
||||||
@ -548,7 +565,6 @@ WellState::report(const int* globalCellIdxMap,
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void WellState::reportConnections(std::vector<data::Connection>& connections,
|
void WellState::reportConnections(std::vector<data::Connection>& connections,
|
||||||
const PhaseUsage &pu,
|
const PhaseUsage &pu,
|
||||||
std::size_t well_index,
|
std::size_t well_index,
|
||||||
@ -672,7 +688,6 @@ void WellState::initWellStateMSWell(const std::vector<Well>& wells_ecl,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
auto& perf_data = ws.perf_data;
|
auto& perf_data = ws.perf_data;
|
||||||
// for the seg_rates_, now it becomes a recursive solution procedure.
|
// for the seg_rates_, now it becomes a recursive solution procedure.
|
||||||
if (pu.phase_used[Gas]) {
|
if (pu.phase_used[Gas]) {
|
||||||
@ -796,8 +811,6 @@ void WellState::updateStatus(int well_index, WellStatus status)
|
|||||||
ws.updateStatus(status);
|
ws.updateStatus(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template<class Comm>
|
template<class Comm>
|
||||||
void WellState::communicateGroupRates(const Comm& comm)
|
void WellState::communicateGroupRates(const Comm& comm)
|
||||||
{
|
{
|
||||||
@ -843,7 +856,6 @@ void WellState::communicateGroupRates(const Comm& comm)
|
|||||||
assert(pos == sz);
|
assert(pos == sz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Comm>
|
template<class Comm>
|
||||||
void WellState::updateGlobalIsGrup(const Comm& comm)
|
void WellState::updateGlobalIsGrup(const Comm& comm)
|
||||||
{
|
{
|
||||||
@ -946,8 +958,6 @@ bool WellState::wellIsOwned(const std::string& wellName) const
|
|||||||
return wellIsOwned(well_index.value(), wellName);
|
return wellIsOwned(well_index.value(), wellName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void WellState::updateWellsDefaultALQ(const std::vector<Well>& wells_ecl)
|
void WellState::updateWellsDefaultALQ(const std::vector<Well>& wells_ecl)
|
||||||
{
|
{
|
||||||
const int nw = wells_ecl.size();
|
const int nw = wells_ecl.size();
|
||||||
@ -968,7 +978,6 @@ bool WellState::operator==(const WellState& rhs) const
|
|||||||
this->wells_ == rhs.wells_;
|
this->wells_ == rhs.wells_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const ParallelWellInfo&
|
const ParallelWellInfo&
|
||||||
WellState::parallelWellInfo(std::size_t well_index) const
|
WellState::parallelWellInfo(std::size_t well_index) const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user