mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
use if constexpr to eliminate some brine code
This commit is contained in:
parent
db668e8d80
commit
bcfab1fed3
@ -77,7 +77,7 @@ namespace Opm
|
||||
OPM_THROW(std::runtime_error, "foam is not supported by multisegment well yet");
|
||||
}
|
||||
|
||||
if (Base::has_brine) {
|
||||
if constexpr (Base::has_brine) {
|
||||
OPM_THROW(std::runtime_error, "brine is not supported by multisegment well yet");
|
||||
}
|
||||
// since we decide to use the WellSegments from the well parser. we can reuse a lot from it.
|
||||
|
@ -831,7 +831,7 @@ namespace Opm
|
||||
connectionRates[perf][contiZfracEqIdx] = Base::restrictEval(cq_s_zfrac_effective);
|
||||
}
|
||||
|
||||
if (has_brine) {
|
||||
if constexpr (has_brine) {
|
||||
// TODO: the application of well efficiency factor has not been tested with an example yet
|
||||
const unsigned waterCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::waterCompIdx);
|
||||
EvalWell cq_s_sm = cq_s[waterCompIdx];
|
||||
|
Loading…
Reference in New Issue
Block a user