From 42601de8924bd7c2fe1ebaf0f9302c8b0f812bd5 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Fri, 24 Aug 2018 13:28:48 +0200 Subject: [PATCH] [3pwateroil][model] Add curly braces to switch statements * fixes clang compiler error --- dumux/porousmediumflow/3pwateroil/model.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dumux/porousmediumflow/3pwateroil/model.hh b/dumux/porousmediumflow/3pwateroil/model.hh index 557061de49..b3bdb846cb 100644 --- a/dumux/porousmediumflow/3pwateroil/model.hh +++ b/dumux/porousmediumflow/3pwateroil/model.hh @@ -118,35 +118,47 @@ struct ThreePWaterOilModelTraits switch (state) { case Indices::threePhases: + { const std::vector<std::string> s1 = {"p_g", "S_w", "S_n"}; return s1[pvIdx]; + } case Indices::wPhaseOnly: + { const std::vector<std::string> s2 = {"p_w", "T", "x^" + FluidSystem::componentName(FluidSystem::nCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::wPhaseIdx)}; return s2[pvIdx]; + } case Indices::gnPhaseOnly: + { const std::vector<std::string> s3 = {"p_g", "S_n", "x^" + FluidSystem::componentName(FluidSystem::wCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::nPhaseIdx)}; return s3[pvIdx]; + } case Indices::wnPhaseOnly: + { const std::vector<std::string> s4 = {"p_w", "T", "S_n"}; return s4[pvIdx]; + } case Indices::gPhaseOnly: + { const std::vector<std::string> s5 = {"p_g", "T", "x^" + FluidSystem::componentName(FluidSystem::nCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::gPhaseIdx)}; return s5[pvIdx]; + } case Indices::wgPhaseOnly: + { const std::vector<std::string> s6 = {"p_g", "S_w", "x^" + FluidSystem::componentName(FluidSystem::nCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::gPhaseIdx)}; return s6[pvIdx]; + } } } }; -- GitLab