add method for getting the surfacevolume well connection rate

changed wellpointer from unique to shared to make it accecible from outside the wellmodel
add method for surfacevolume well connection rate
This commit is contained in:
Trine S Mykkeltvedt
2018-11-14 13:18:48 +01:00
parent c006ea23f2
commit 9fa2c09783
4 changed files with 37 additions and 1 deletions

View File

@@ -358,6 +358,22 @@ namespace Opm {
well->addCellRates(rate, elemIdx);
}
template<typename TypeTag>
typename BlackoilWellModel<TypeTag>::WellInterfacePtr
BlackoilWellModel<TypeTag>::
well(const std::string& wellName) const
{
for (const auto& well : well_container_) {
if (well->name() == wellName) {
return well;
}
}
OPM_THROW(std::invalid_argument, "The well with name " + wellName + " is not in the well Container");
return nullptr;
}
template<typename TypeTag>
void
BlackoilWellModel<TypeTag>::