mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-03 05:40:26 -06:00
Use (c1,c2) alias rather than neigh[] references where possible.
This commit is contained in:
parent
4313d35883
commit
f08a4ba437
@ -314,10 +314,13 @@ partition_create_c2c(int nc, int nneigh, const int *neigh,
|
||||
|
||||
if (*pc2c != NULL) {
|
||||
for (i = 0; i < nneigh; i++) {
|
||||
if ((neigh[2*i + 0] >= 0) && (neigh[2*i + 1] >= 0)) {
|
||||
c1 = neigh[2*i + 0];
|
||||
c2 = neigh[2*i + 1];
|
||||
|
||||
if ((c1 >= 0) && (c2 >= 0)) {
|
||||
/* Symmetric Laplace matrix (undirected graph) */
|
||||
(*pc2c)[ neigh[2*i + 0] + 1 ] ++;
|
||||
(*pc2c)[ neigh[2*i + 1] + 1 ] ++;
|
||||
(*pc2c)[ c1 + 1 ] ++;
|
||||
(*pc2c)[ c2 + 1 ] ++;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user