copying the thp value from prevState.

This commit is contained in:
Kai Bao 2017-03-08 11:33:16 +01:00
parent 77ec45cdd2
commit 2bc1c8702e
2 changed files with 7 additions and 0 deletions

View File

@ -2481,9 +2481,13 @@ namespace Opm {
switch (well_controls_iget_type(wc, current)) {
case BHP:
xw.bhp()[well_index] = target;
// TODO: similar to the way below to handle THP
// we should not something related to thp here when there is thp constraint
break;
case THP: {
xw.thp()[well_index] = target;
double aqua = 0.0;
double liquid = 0.0;
double vapour = 0.0;

View File

@ -123,6 +123,9 @@ namespace Opm
// bhp
bhp()[ newIndex ] = prevState.bhp()[ oldIndex ];
// thp
thp()[ newIndex ] = prevState.thp()[ oldIndex ];
// wellrates
for( int i=0, idx=newIndex*np, oldidx=oldIndex*np; i<np; ++i, ++idx, ++oldidx )
{