Skip to content
Snippets Groups Projects
Commit 3cc4d975 authored by Kilian Weishaupt's avatar Kilian Weishaupt
Browse files

[3p3c][model] Add curly braces to switch statements

* fixes clang compiler error
parent 3f833825
No related branches found
No related tags found
1 merge request!1188Fix clang compiler errors
......@@ -128,35 +128,47 @@ struct ThreePThreeCModelTraits
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_g",
"x^" + FluidSystem::componentName(FluidSystem::gCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::wPhaseIdx),
"x^" + FluidSystem::componentName(FluidSystem::nCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::wPhaseIdx)};
return s2[pvIdx];
}
case Indices::gnPhaseOnly:
{
const std::vector<std::string> s3 = {"p_g",
"x^" + FluidSystem::componentName(FluidSystem::wCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::gPhaseIdx),
"S_n"};
return s3[pvIdx];
}
case Indices::wnPhaseOnly:
{
const std::vector<std::string> s4 = {"p_g",
"x^" + FluidSystem::componentName(FluidSystem::gCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::wPhaseIdx),
"S_n"};
return s4[pvIdx];
}
case Indices::gPhaseOnly:
{
const std::vector<std::string> s5 = {"p_g",
"x^" + FluidSystem::componentName(FluidSystem::wCompIdx) + "_" + FluidSystem::phaseName(FluidSystem::gPhaseIdx),
"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];
}
}
}
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment