This statement is wrong. It assumes that `i` is a cell number, but this function can just as well be called with n equal to the number of well perforation cells for example, intending to iterate over that set instead.

One solution (which is probably the simplest) is to communicate the cell indices through each and every one of these interfaces (mu, B, dBdp etc.). This change must then be made in all the Pvt* classes.

Alternatively, the region mapping may be handled in the higher level object, but that would probably be of equal complexity, and since you have started with the assumption that the Pvt* classes handle this individually, it is probably more work to do, starting from the current state.

Until fixed, this is a showstopper for this PR.