mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-18 21:43:27 -06:00
Fix indexing bug in well handling code for incremental (Newton) pressure assembly.
This commit is contained in:
parent
1aa5d6b293
commit
a4b32311b2
@ -760,7 +760,7 @@ ifs_tpfa_assemble_comprock_increment(struct UnstructuredGrid *G ,
|
||||
struct ifs_tpfa_data *h )
|
||||
/* ---------------------------------------------------------------------- */
|
||||
{
|
||||
int c, w, system_singular, ok;
|
||||
int c, w, wdof, system_singular, ok;
|
||||
size_t j;
|
||||
double *v;
|
||||
|
||||
@ -782,7 +782,8 @@ ifs_tpfa_assemble_comprock_increment(struct UnstructuredGrid *G ,
|
||||
}
|
||||
if (F->W != NULL) {
|
||||
for (w = 0; w < F->W->number_of_wells; ++w) {
|
||||
h->b[c] += -v[c];
|
||||
wdof = G->number_of_cells + w;
|
||||
h->b[wdof] += -v[wdof];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user