mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
use if constexpr to eliminate some foam code
This commit is contained in:
parent
6157122bd8
commit
1fa74b5889
@ -73,7 +73,7 @@ namespace Opm
|
||||
OPM_THROW(std::runtime_error, "energy is not supported by multisegment well yet");
|
||||
}
|
||||
|
||||
if (Base::has_foam) {
|
||||
if constexpr (Base::has_foam) {
|
||||
OPM_THROW(std::runtime_error, "foam is not supported by multisegment well yet");
|
||||
}
|
||||
|
||||
|
@ -793,7 +793,7 @@ namespace Opm
|
||||
}
|
||||
}
|
||||
|
||||
if (has_foam) {
|
||||
if constexpr (has_foam) {
|
||||
// TODO: the application of well efficiency factor has not been tested with an example yet
|
||||
const unsigned gasCompIdx = Indices::canonicalToActiveComponentIndex(FluidSystem::gasCompIdx);
|
||||
EvalWell cq_s_foam = cq_s[gasCompIdx] * well_efficiency_factor_;
|
||||
|
Loading…
Reference in New Issue
Block a user