Remove the need for add well contributions to matrix for NLDD
The PR currently addresses the following fixes:
-
Make well equations use only perforated cells. Previously, the B and C equations for the well equations had dimensions of the total number of cells. Since the matrices are sparse we aren't storing that much extra data, but in CSR we still need to store an offset for each row and we are probably iterating over the rows somewhere. After this fix it only uses the perforated cells. With this fix everything builds and runs without errors. However, there are some small convergence issues that were not there before. This is not expected as we would expect this to do exactly the same operations. So there is likely a bug somewhere. I am not sure if I introduced this bug or if this change exposed another bug. Any insight here would be helpful. There is also some fixes that needs to be done for cprw to work with this change.
-
Remove the need for using add well contributions to matrix for NLDD, by doing a mapping from global cell indexes to local cell indexes in the subdomains. This doesn't currently work for MPI parallel. Haven't looked into that part yet.
At the moment it is a bit hacky and there are some redundant work being done but it shows how these issues can be fixed.