diff --git a/opm/simulators/wells/MultisegmentWellAssemble.cpp b/opm/simulators/wells/MultisegmentWellAssemble.cpp index 79575e4e6..2a94144f1 100644 --- a/opm/simulators/wells/MultisegmentWellAssemble.cpp +++ b/opm/simulators/wells/MultisegmentWellAssemble.cpp @@ -352,7 +352,7 @@ assembleInflowTerm(const int seg, template void MultisegmentWellAssemble:: assemblePerforationEq(const int seg, - const int cell_idx, + const int local_perf_index, const int comp_idx, const EvalWell& cq_s_effective, Equations& eqns1) const @@ -364,7 +364,7 @@ assemblePerforationEq(const int seg, // assemble the jacobians for (int pv_idx = 0; pv_idx < numWellEq; ++pv_idx) { // also need to consider the efficiency factor when manipulating the jacobians. - eqns.C()[seg][cell_idx][pv_idx][comp_idx] -= cq_s_effective.derivative(pv_idx + Indices::numEq); // input in transformed matrix + eqns.C()[seg][local_perf_index][pv_idx][comp_idx] -= cq_s_effective.derivative(pv_idx + Indices::numEq); // input in transformed matrix // the index name for the D should be eq_idx / pv_idx eqns.D()[seg][seg][comp_idx][pv_idx] += cq_s_effective.derivative(pv_idx + Indices::numEq); @@ -372,7 +372,7 @@ assemblePerforationEq(const int seg, for (int pv_idx = 0; pv_idx < Indices::numEq; ++pv_idx) { // also need to consider the efficiency factor when manipulating the jacobians. - eqns.B()[seg][cell_idx][comp_idx][pv_idx] += cq_s_effective.derivative(pv_idx); + eqns.B()[seg][local_perf_index][comp_idx][pv_idx] += cq_s_effective.derivative(pv_idx); } } diff --git a/opm/simulators/wells/MultisegmentWellAssemble.hpp b/opm/simulators/wells/MultisegmentWellAssemble.hpp index 5ce922c72..7340fa7dd 100644 --- a/opm/simulators/wells/MultisegmentWellAssemble.hpp +++ b/opm/simulators/wells/MultisegmentWellAssemble.hpp @@ -139,7 +139,7 @@ public: //! \brief Assemble equation for a perforation. void assemblePerforationEq(const int seg, - const int cell_idx, + const int local_perf_index, const int comp_idx, const EvalWell& cq_s_effective, Equations& eqns) const;