throw when calling addWellContributions() for MSW

This commit is contained in:
Kai Bao 2019-08-15 11:29:30 +02:00
parent cc472da226
commit f40c1cc12f
3 changed files with 15 additions and 2 deletions

View File

@ -152,6 +152,8 @@ namespace Opm
const WellState& well_state, const WellState& well_state,
Opm::DeferredLogger& deferred_logger) override; // should be const? Opm::DeferredLogger& deferred_logger) override; // should be const?
virtual void addWellContributions(Mat& mat) const override;
/// number of segments for this well /// number of segments for this well
/// int number_of_segments_; /// int number_of_segments_;
int numberOfSegments() const; int numberOfSegments() const;

View File

@ -875,6 +875,18 @@ namespace Opm
template<typename TypeTag>
void
MultisegmentWell<TypeTag>::
addWellContributions(Mat& /* mat */) const
{
OPM_THROW(std::runtime_error, "addWellContributions is not supported by multisegment well yet");
}
template <typename TypeTag> template <typename TypeTag>
const WellSegments& const WellSegments&
MultisegmentWell<TypeTag>:: MultisegmentWell<TypeTag>::

View File

@ -208,8 +208,7 @@ namespace Opm
void calculateReservoirRates(WellState& well_state) const; void calculateReservoirRates(WellState& well_state) const;
// Add well contributions to matrix // Add well contributions to matrix
virtual void addWellContributions(Mat&) const virtual void addWellContributions(Mat&) const = 0;
{}
void addCellRates(RateVector& rates, int cellIdx) const; void addCellRates(RateVector& rates, int cellIdx) const;