fixing one memory-leaking for flow_ebos running 2p case.

This commit is contained in:
Kai Bao
2017-08-21 17:05:26 +02:00
parent 96340a23ff
commit a60a969257

View File

@@ -1476,8 +1476,10 @@ namespace Opm
const double tol_wells = param.tolerance_wells_;
const double maxResidualAllowed = param.max_residual_allowed_;
// TODO: it should be the number of numWellEq
// using numComp here for flow_ebos running 2p case.
std::vector<Scalar> res(numComp);
for (int comp = 0; comp < numWellEq; ++comp) {
for (int comp = 0; comp < numComp; ++comp) {
// magnitude of the residual matters
res[comp] = std::abs(resWell_[0][comp]);
}