Some of our computations are heavily serial and need a complete
representation of the data attached to all perforation no matter
whether a perforation lives on the local partition or not. This commit
adds a factory that allows to easily create such a representaion and
helps writing data back to the local representation.
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 adds an utility that creates a vector of all above values for
the local perforations. For distributed wells this is needed as the
perforation above might live on another processor. We use the parallel
index sets together with the global index of the cells that are
perforated.
The B matrix is basically a component-wise multiplication
with a vector followed by a parallel reduction. We do that
reduction to all ranks computing for the well to save the
broadcast when applying C^T.
BlackoilWellModel now stores an instance of this class for each
well. Inside that class there is a custom communicator that only
contains ranks that will have local cells perforated by the well.
This will be used in the application of the distributed well operator.
This is another small step in the direction of distributed wells,
but it should be safe to merge this (note creation of the custom
communicators is a collective operation in MPI but done only once).
- The edit manipulations from EDITNNC have already been applied to the NNC data
from opm-common
- The NNC data structures are guaranteed to be ordered, both with cell1 <= cell2
and the NNCs are in ascending order
- The NNC output to EGRID / INIT files is based on std::vector<NNCdata>
|(value-expected)/expected| < tol or |(value-expected)/value| < tol
instead of
|(value-expected)/(value+expected)|
this is how boost::test defines its check
|(value-expected)/expected| < tol or |(value-expected)/value| < tol
instead of
|(value-expected)/(value+expected)|
this is how boost::test defines its check