fixing the prallel running.

It needs WellSwitchingLogger for all the processes even there are not
wells in some of the processes.
This commit is contained in:
Kai Bao 2017-08-08 12:30:24 +02:00
parent 5cb0a5109e
commit 31ce880ba7
4 changed files with 9 additions and 5 deletions

View File

@ -131,7 +131,8 @@ namespace Opm
// TODO: this should go to the WellInterface, while updateWellStateWithTarget // TODO: this should go to the WellInterface, while updateWellStateWithTarget
// will need touch different types of well_state, we will see. // will need touch different types of well_state, we will see.
virtual void updateWellControl(WellState& xw) const; virtual void updateWellControl(WellState& xw,
wellhelpers::WellSwitchingLogger& logger) const;
/// check whether the well equations get converged for this well /// check whether the well equations get converged for this well
virtual bool getWellConvergence(Simulator& ebosSimulator, virtual bool getWellConvergence(Simulator& ebosSimulator,

View File

@ -1269,7 +1269,8 @@ namespace Opm
template<typename TypeTag> template<typename TypeTag>
void void
StandardWell<TypeTag>:: StandardWell<TypeTag>::
updateWellControl(WellState& xw) const updateWellControl(WellState& xw,
wellhelpers::WellSwitchingLogger& logger) const
{ {
const int np = number_of_phases_; const int np = number_of_phases_;
const int nw = xw.bhp().size(); const int nw = xw.bhp().size();
@ -1329,7 +1330,6 @@ namespace Opm
const int updated_control_index = xw.currentControls()[w]; const int updated_control_index = xw.currentControls()[w];
// checking whether control changed // checking whether control changed
wellhelpers::WellSwitchingLogger logger;
if (updated_control_index != old_control_index) { if (updated_control_index != old_control_index) {
logger.wellSwitched(name_, logger.wellSwitched(name_,
well_controls_iget_type(wc, old_control_index), well_controls_iget_type(wc, old_control_index),

View File

@ -657,8 +657,10 @@ namespace Opm {
// we simply return. // we simply return.
if( !wellsActive() ) return ; if( !wellsActive() ) return ;
wellhelpers::WellSwitchingLogger logger;
for (const auto& well : well_container_) { for (const auto& well : well_container_) {
well->updateWellControl(xw); well->updateWellControl(xw, logger);
} }
} }

View File

@ -151,7 +151,8 @@ namespace Opm
virtual void updateWellStateWithTarget(const int current, virtual void updateWellStateWithTarget(const int current,
WellState& xw) const = 0; WellState& xw) const = 0;
virtual void updateWellControl(WellState& xw) const = 0; virtual void updateWellControl(WellState& xw,
wellhelpers::WellSwitchingLogger& logger) const = 0;
virtual void setWellSolutions(const WellState& well_state) const = 0; virtual void setWellSolutions(const WellState& well_state) const = 0;