This commit is contained in:
Kjetil Olsen Lye 2012-05-10 12:50:22 +02:00
commit 10b738c7e3
2 changed files with 10 additions and 2 deletions

View File

@ -341,7 +341,10 @@ namespace Opm
soln.well_press = &well_bhp[0]; soln.well_press = &well_bhp[0];
} }
memcpy(h_->x, &pressure[0], grid_.number_of_cells * sizeof *(h_->x)); // memcpy(h_->x, &pressure[0], grid_.number_of_cells * sizeof *(h_->x));
ASSERT(int(pressure.size()) == grid_.number_of_cells);
std::copy(pressure.begin(), pressure.end(), h_->x);
std::copy(well_bhp.begin(), well_bhp.end(), h_->x + grid_.number_of_cells);
ifs_tpfa_press_flux(gg, &F, &trans_[0], h_, &soln); ifs_tpfa_press_flux(gg, &F, &trans_[0], h_, &soln);
} }

View File

@ -760,7 +760,7 @@ ifs_tpfa_assemble_comprock_increment(struct UnstructuredGrid *G ,
struct ifs_tpfa_data *h ) struct ifs_tpfa_data *h )
/* ---------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- */
{ {
int c, system_singular, ok; int c, w, system_singular, ok;
size_t j; size_t j;
double *v; double *v;
@ -780,6 +780,11 @@ ifs_tpfa_assemble_comprock_increment(struct UnstructuredGrid *G ,
h->A->sa[j] += porevol[c] * rock_comp[c] / dt; h->A->sa[j] += porevol[c] * rock_comp[c] / dt;
h->b[c] += -(porevol[c] - initial_porevolume[c])/dt - v[c]; h->b[c] += -(porevol[c] - initial_porevolume[c])/dt - v[c];
} }
if (F->W != NULL) {
for (w = 0; w < F->W->number_of_wells; ++w) {
h->b[c] += -v[c];
}
}
} }
return ok; return ok;