removing the updateWellState from the models.

This commit is contained in:
Kai Bao 2016-05-10 14:19:15 +02:00
parent 4e8099057e
commit 01328559e2
2 changed files with 3 additions and 35 deletions

View File

@ -1072,7 +1072,6 @@ namespace detail {
ADB::V total_residual_v = total_residual.value(); ADB::V total_residual_v = total_residual.value();
const Eigen::VectorXd& dx = solver.solve(total_residual_v.matrix()); const Eigen::VectorXd& dx = solver.solve(total_residual_v.matrix());
assert(dx.size() == total_residual_v.size()); assert(dx.size() == total_residual_v.size());
// asImpl().updateWellState(dx.array(), well_state);
asImpl().wellModel().updateWellState(dx.array(), dpMaxRel(), well_state); asImpl().wellModel().updateWellState(dx.array(), dpMaxRel(), well_state);
asImpl().wellModel().updateWellControls(terminal_output_, well_state); asImpl().wellModel().updateWellControls(terminal_output_, well_state);
} }
@ -1461,10 +1460,8 @@ namespace detail {
std::copy(&rv[0], &rv[0] + nc, reservoir_state.rv().begin()); std::copy(&rv[0], &rv[0] + nc, reservoir_state.rv().begin());
} }
// TODO: gravity should be stored as a member
// const double gravity = detail::getGravity(geo_.gravity(), UgGridHelpers::dimensions(grid_)); asImpl().wellModel().updateWellState(dwells, dpMaxRel(), well_state);
// asImpl().wellModel().updateWellState(dwells, gravity, dpMaxRel(), fluid_.phaseUsage(), active_, vfp_properties_, well_state);
asImpl().updateWellState(dwells,well_state);
// Update phase conditions used for property calculations. // Update phase conditions used for property calculations.
updatePhaseCondFromPrimalVariable(reservoir_state); updatePhaseCondFromPrimalVariable(reservoir_state);
@ -2296,23 +2293,6 @@ namespace detail {
// TODO: only kept for now due to flow_multisegment
// will be removed soon
template <class Grid, class WellModel, class Implementation>
void
BlackoilModelBase<Grid, WellModel, Implementation>::
updateWellState(const V& dwells,
WellState& well_state)
{
asImpl().wellModel().updateWellState(dwells, dpMaxRel(), well_state);
}
} // namespace Opm } // namespace Opm
#endif // OPM_BLACKOILMODELBASE_IMPL_HEADER_INCLUDED #endif // OPM_BLACKOILMODELBASE_IMPL_HEADER_INCLUDED

View File

@ -324,18 +324,6 @@ namespace Opm {
template <class Grid>
void
BlackoilMultiSegmentModel<Grid>::updateWellState(const V& dwells,
WellState& well_state)
{
wellModel().updateWellState(dwells, dpMaxRel(), well_state);
}
/// added to fixing the flow_multisegment running /// added to fixing the flow_multisegment running
template <class Grid> template <class Grid>
bool bool
@ -402,7 +390,7 @@ namespace Opm {
ADB::V total_residual_v = total_residual.value(); ADB::V total_residual_v = total_residual.value();
const Eigen::VectorXd& dx = solver.solve(total_residual_v.matrix()); const Eigen::VectorXd& dx = solver.solve(total_residual_v.matrix());
assert(dx.size() == total_residual_v.size()); assert(dx.size() == total_residual_v.size());
asImpl().updateWellState(dx.array(), well_state); wellModel().updateWellState(dx.array(), dpMaxRel(), well_state);
wellModel().updateWellControls(terminal_output_, well_state); wellModel().updateWellControls(terminal_output_, well_state);
} }
} while (it < 15); } while (it < 15);