diff --git a/opm/polymer/TransportModelPolymer.cpp b/opm/polymer/TransportModelPolymer.cpp index 779755b14..3b7b93f1d 100644 --- a/opm/polymer/TransportModelPolymer.cpp +++ b/opm/polymer/TransportModelPolymer.cpp @@ -828,7 +828,7 @@ namespace Opm void TransportModelPolymer::fracFlow(double s, double c, double cmax, int cell, double& ff) const { - double* dummy; + double dummy[2]; fracFlowBoth(s, c, cmax, cell, ff, dummy, false); } diff --git a/opm/polymer/polymerUtilities.cpp b/opm/polymer/polymerUtilities.cpp index 659780074..0a1a97129 100644 --- a/opm/polymer/polymerUtilities.cpp +++ b/opm/polymer/polymerUtilities.cpp @@ -79,7 +79,7 @@ namespace Opm props.relperm(num_cells, &s[0], &cells[0], &kr[0], 0); const double* visc = props.viscosity(); const double* rho = props.density(); - double mob[num_phases]; // here we assume num_phases=2 + double mob[2]; // here we assume num_phases=2 for (int cell = 0; cell < num_cells; ++cell) { double* kr_cell = &kr[2*cell]; polyprops.effectiveMobilities(c[cell], cmax[cell], visc, kr_cell, @@ -132,7 +132,7 @@ namespace Opm polyprod = 0.0; const double* visc = props.viscosity(); std::vector kr_cell(np); - double mob[np]; + double mob[2]; for (int cell = 0; cell < num_cells; ++cell) { if (src[cell] > 0.0) { injected[0] += src[cell]*dt;