mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-13 17:32:03 -05:00
use if constexpr to eliminate some foam code
This commit is contained in:
1 parent
6157122bd8
commit
1fa74b5889
2 files changed
+2
-2
No files matched your search
@@ -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_;
|
||||
|
||||
Reference in new issue
Block a user