mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: make has_brine contexpr
and use if constexpr to eliminate some code
This commit is contained in:
@@ -422,19 +422,19 @@ namespace Opm
|
||||
WellInterface<TypeTag>::
|
||||
wsalt() const
|
||||
{
|
||||
if (!has_brine) {
|
||||
return 0.0;
|
||||
if constexpr (has_brine) {
|
||||
auto injectorType = well_ecl_.injectorType();
|
||||
|
||||
if (injectorType == InjectorType::WATER) {
|
||||
WellBrineProperties fprop = well_ecl_.getBrineProperties();
|
||||
return fprop.m_saltConcentration;
|
||||
} else {
|
||||
// Not a water injection well => no salt (?).
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
auto injectorType = well_ecl_.injectorType();
|
||||
|
||||
if (injectorType == InjectorType::WATER) {
|
||||
WellBrineProperties fprop = well_ecl_.getBrineProperties();
|
||||
return fprop.m_saltConcentration;
|
||||
} else {
|
||||
// Not a water injection well => no salt (?).
|
||||
return 0.0;
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user