Skip to content
Snippets Groups Projects
Commit c2e21d11 authored by Simon Emmert's avatar Simon Emmert
Browse files

[fluidstate] initialize fields of compositional fluidstate to 0, remove setUndefined

parent 8deaef97
No related branches found
No related tags found
1 merge request!1053[fluidstate] initialize fields of compositional fluidstate to 0
...@@ -55,14 +55,19 @@ public: ...@@ -55,14 +55,19 @@ public:
for (int compIdx = 0; compIdx < numComponents; ++compIdx) for (int compIdx = 0; compIdx < numComponents; ++compIdx)
{ {
moleFraction_[phaseIdx][compIdx] = 0; moleFraction_[phaseIdx][compIdx] = 0;
fugacityCoefficient_[phaseIdx][compIdx] = 0;
} }
averageMolarMass_[phaseIdx] = 0; averageMolarMass_[phaseIdx] = 0;
sumMoleFractions_[phaseIdx] = 0; sumMoleFractions_[phaseIdx] = 0;
pressure_[phaseIdx] = 0;
saturation_[phaseIdx] = 0;
density_[phaseIdx] = 0;
molarDensity_[phaseIdx] = 0;
enthalpy_[phaseIdx] = 0;
viscosity_[phaseIdx] = 0;
temperature_[phaseIdx] = 0;
} }
// make everything undefined so that valgrind will complain
Valgrind::SetUndefined(*this);
} }
template <class FluidState> template <class FluidState>
......
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