mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
eclproblem: use if constexpr for enableApiTracking
This commit is contained in:
parent
be9c03bfac
commit
aa7ec98c0f
@ -2296,10 +2296,12 @@ private:
|
|||||||
// Only rank 0 has the deck and hence can do the checks!
|
// Only rank 0 has the deck and hence can do the checks!
|
||||||
const auto& deck = this->simulator().vanguard().deck();
|
const auto& deck = this->simulator().vanguard().deck();
|
||||||
|
|
||||||
if (enableApiTracking)
|
if constexpr (enableApiTracking)
|
||||||
throw std::logic_error("API tracking is not yet implemented but requested at compile time.");
|
throw std::logic_error("API tracking is not yet implemented but requested at compile time.");
|
||||||
if (!enableApiTracking && deck.hasKeyword("API"))
|
else {
|
||||||
throw std::logic_error("The simulator is build with API tracking disabled, but API tracking is requested by the deck.");
|
if (deck.hasKeyword("API"))
|
||||||
|
throw std::logic_error("The simulator is build with API tracking disabled, but API tracking is requested by the deck.");
|
||||||
|
}
|
||||||
|
|
||||||
if constexpr (enableSolvent) {
|
if constexpr (enableSolvent) {
|
||||||
if (!deck.hasKeyword("SOLVENT"))
|
if (!deck.hasKeyword("SOLVENT"))
|
||||||
|
Loading…
Reference in New Issue
Block a user