mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-19 05:53:28 -06:00
Assemble_bhp_well(): Don't look up wdof diagonal element multiple times.
This commit is contained in:
parent
af80492ff3
commit
18cdd5f1e3
@ -207,13 +207,14 @@ assemble_bhp_well(int nc, int w,
|
||||
wdof = nc + w;
|
||||
bhp = ctrls->target[ ctrls->current ];
|
||||
|
||||
jw = csrmatrix_elm_index(wdof, wdof, h->A);
|
||||
|
||||
for (i = W->well_connpos[w]; i < W->well_connpos[w + 1]; i++) {
|
||||
|
||||
c = W->well_cells [ i ];
|
||||
trans = mt[ c ] * W->WI[ i ];
|
||||
|
||||
jc = csrmatrix_elm_index(c , c , h->A);
|
||||
jw = csrmatrix_elm_index(wdof, wdof, h->A);
|
||||
jc = csrmatrix_elm_index(c, c, h->A);
|
||||
|
||||
/* c<->c diagonal contribution from well */
|
||||
h->A->sa[ jc ] += trans;
|
||||
|
Loading…
Reference in New Issue
Block a user