Skip to content

Commit

Permalink
Merge pull request #1168 from dr-robertk/PR/remove-warnings
Browse files Browse the repository at this point in the history
[cleanup] remove two uninitialized warnings in SaturationProposFromDeck.
  • Loading branch information
atgeirr committed Jun 7, 2017
2 parents d504715 + d058d8e commit 4bab353
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions opm/core/props/satfunc/SaturationPropsFromDeck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace Opm
ExplicitArraysFluidState fluidState(phaseUsage_);
fluidState.setSaturationArray(s);

double relativePerms[BlackoilPhases::MaxNumPhases];
double relativePerms[BlackoilPhases::MaxNumPhases] = { 0 };
for (int i = 0; i < n; ++i) {
fluidState.setIndex(i);
const auto& params = materialLawManager_->materialLawParams(cells[i]);
Expand Down Expand Up @@ -136,7 +136,7 @@ namespace Opm
double* pc,
double* dpcds) const
{
assert(cells != 0);
assert(cells != 0);
assert(phaseUsage_.phase_used[BlackoilPhases::Liquid]);

const int np = numPhases();
Expand Down Expand Up @@ -179,8 +179,8 @@ namespace Opm
ExplicitArraysFluidState fluidState(phaseUsage_);
fluidState.setSaturationArray(s);

double capillaryPressures[BlackoilPhases::MaxNumPhases];
for (int i = 0; i < n; ++i) {
double capillaryPressures[BlackoilPhases::MaxNumPhases] = { 0 };
for (int i = 0; i < n; ++i) {
fluidState.setIndex(i);
const auto& params = materialLawManager_->materialLawParams(cells[i]);
MaterialLaw::capillaryPressures(capillaryPressures, params, fluidState);
Expand Down Expand Up @@ -249,13 +249,13 @@ namespace Opm
}
}

/// Update saturation state for the hysteresis tracking
/// \param[in] n Number of data points.
/// Update saturation state for the hysteresis tracking
/// \param[in] n Number of data points.
/// \param[in] s Array of nP saturation values.
void SaturationPropsFromDeck::updateSatHyst(const int n,
const int* cells,
const double* s)
{
{
assert(cells != 0);

if (materialLawManager_->enableHysteresis()) {
Expand Down

0 comments on commit 4bab353

Please sign in to comment.