Avoid copying of SummaryConfig

This commit is contained in:
Tor Harald Sandve 2018-11-16 16:03:23 +01:00
parent 54e33a00d2
commit 9903738690
3 changed files with 6 additions and 3 deletions

View File

@ -202,6 +202,8 @@ namespace Opm {
schedule().getVFPInjTables(timeStepIdx), schedule().getVFPInjTables(timeStepIdx),
schedule().getVFPProdTables(timeStepIdx)) ); schedule().getVFPProdTables(timeStepIdx)) );
} }
@ -889,7 +891,7 @@ namespace Opm {
const int np = numPhases(); const int np = numPhases();
well_potentials.resize(nw * np, 0.0); well_potentials.resize(nw * np, 0.0);
const Opm::SummaryConfig summaryConfig = ebosSimulator_.vanguard().summaryConfig(); const Opm::SummaryConfig& summaryConfig = ebosSimulator_.vanguard().summaryConfig();
for (const auto& well : well_container_) { for (const auto& well : well_container_) {
// Only compute the well potential when asked for // Only compute the well potential when asked for
bool needed_for_output = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) || bool needed_for_output = ((summaryConfig.hasSummaryKey( "WWPI:" + well->name()) ||

View File

@ -438,7 +438,7 @@ namespace Opm
WellState& well_state) WellState& well_state)
{ {
const Opm::SummaryConfig summaryConfig = ebosSimulator.vanguard().summaryConfig(); const Opm::SummaryConfig& summaryConfig = ebosSimulator.vanguard().summaryConfig();
const int np = number_of_phases_; const int np = number_of_phases_;

View File

@ -128,7 +128,7 @@ namespace Opm
init(const PhaseUsage* phase_usage_arg, init(const PhaseUsage* phase_usage_arg,
const std::vector<double>& /* depth_arg */, const std::vector<double>& /* depth_arg */,
const double gravity_arg, const double gravity_arg,
const int /*num_cells*/) const int /* num_cells */)
{ {
phase_usage_ = phase_usage_arg; phase_usage_ = phase_usage_arg;
gravity_ = gravity_arg; gravity_ = gravity_arg;
@ -137,6 +137,7 @@ namespace Opm
template<typename TypeTag> template<typename TypeTag>
void void
WellInterface<TypeTag>:: WellInterface<TypeTag>::