Merge pull request #1975 from GitPaean/throw_addwell_contribution_msw

throw when calling addWellContributions() for MSW
This commit is contained in:
Kai Bao 2019-08-15 12:43:08 +02:00 committed by GitHub
commit deeecf8c04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -152,6 +152,8 @@ namespace Opm
const WellState& well_state,
Opm::DeferredLogger& deferred_logger) override; // should be const?
virtual void addWellContributions(Mat& mat) const override;
/// number of segments for this well
/// int number_of_segments_;
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>
const WellSegments&
MultisegmentWell<TypeTag>::

View File

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