Productivity Index Calculator: Add Reinitialization operation

This commit adds a new member function

    WellProdIndexCalculator::reInit(const Well& well)

which reinitializes the internal arrays in the same way as the
constructor.  This is needed to ensure that the PI calculation
device is synchronised in the case of CTF rescaling-e.g., as a
result of WELPI.
This commit is contained in:
Bård Skaflestad
2020-10-19 23:06:13 +02:00
parent 3ac2f02f4f
commit aaca907f77
3 changed files with 213 additions and 2 deletions

View File

@@ -96,6 +96,11 @@ Opm::WellProdIndexCalculator::WellProdIndexCalculator(const Well& well)
: standardConnFactors_{ calculateStandardConnFactors(well) }
{}
void Opm::WellProdIndexCalculator::reInit(const Well& well)
{
this->standardConnFactors_ = calculateStandardConnFactors(well);
}
double
Opm::WellProdIndexCalculator::
connectionProdIndStandard(const std::size_t connIdx,