diff --git a/examples/spu_2p.cpp b/examples/spu_2p.cpp index 1f9fce7c..30d6f71e 100644 --- a/examples/spu_2p.cpp +++ b/examples/spu_2p.cpp @@ -403,12 +403,8 @@ main(int argc, char** argv) } double tot_porevol_init = std::accumulate(porevol.begin(), porevol.end(), 0.0); - // We need a separate reorder_sat, because the reorder - // code expects a scalar sw, not both sw and so. - std::vector reorder_sat(num_cells); - std::vector src(num_cells, 0.0); - // Initialising src + std::vector src(num_cells, 0.0); if (wells->c_wells()) { // Do nothing, wells will be the driving force, not source terms. // Opm::wellsToSrc(*wells->c_wells(), num_cells, src); @@ -650,16 +646,13 @@ main(int argc, char** argv) } for (int tr_substep = 0; tr_substep < num_transport_substeps; ++tr_substep) { if (use_reorder) { - Opm::toWaterSat(state.saturation(), reorder_sat); reorder_model.solve(&state.faceflux()[0], &porevol[0], &reorder_src[0], - stepsize, &reorder_sat[0]); - Opm::toBothSat(reorder_sat, state.saturation()); + stepsize, state.saturation()); Opm::computeInjectedProduced(*props, state.saturation(), reorder_src, stepsize, injected, produced); if (use_segregation_split) { if (use_column_solver) { if (use_gauss_seidel_gravity) { - reorder_model.solveGravity(columns, &porevol[0], stepsize, reorder_sat); - Opm::toBothSat(reorder_sat, state.saturation()); + reorder_model.solveGravity(columns, &porevol[0], stepsize, state.saturation()); } else { colsolver.solve(columns, stepsize, state.saturation()); }