Changed interface of TransportModelPolymer to expect full saturation, not just water.

This commit is contained in:
Atgeirr Flø Rasmussen
2012-06-13 14:18:32 +02:00
parent c4b81d8da5
commit ffd33be55d
3 changed files with 19 additions and 22 deletions

View File

@@ -509,12 +509,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<double> reorder_sat(num_cells);
std::vector<double> src(num_cells, 0.0);
// Initialising src
std::vector<double> 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);
@@ -746,19 +742,16 @@ 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, inflow_c,
&reorder_sat[0], &state.concentration()[0], &state.maxconcentration()[0]);
Opm::toBothSat(reorder_sat, state.saturation());
state.saturation(), state.concentration(), state.maxconcentration());
Opm::computeInjectedProduced(*props, polyprop, state.saturation(), state.concentration(), state.maxconcentration(),
reorder_src, simtimer.currentStepLength(), inflow_c,
injected, produced, polyinj, polyprod);
if (use_segregation_split) {
if (use_column_solver) {
if (use_gauss_seidel_gravity) {
reorder_model.solveGravity(columns, &porevol[0], stepsize, reorder_sat,
reorder_model.solveGravity(columns, &porevol[0], stepsize, state.saturation(),
state.concentration(), state.maxconcentration());
Opm::toBothSat(reorder_sat, state.saturation());
} else {
colsolver.solve(columns, stepsize, state.saturation(), state.concentration(),
state.maxconcentration());