mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge and dded default oil handling
This commit is contained in:
commit
c3759353ec
@ -138,6 +138,7 @@ partition_compress(int n, int *p)
|
|||||||
int ret, i, max, *compr;
|
int ret, i, max, *compr;
|
||||||
|
|
||||||
max = -1;
|
max = -1;
|
||||||
|
assert(n > 0);
|
||||||
for (i = 0; i < n; i++) {
|
for (i = 0; i < n; i++) {
|
||||||
assert (0 <= p[i]); /* Only non-neg partitions (for now?). */
|
assert (0 <= p[i]); /* Only non-neg partitions (for now?). */
|
||||||
max = MAX(max, p[i]);
|
max = MAX(max, p[i]);
|
||||||
@ -313,6 +314,9 @@ partition_create_c2c(int nc, int nneigh, const int *neigh,
|
|||||||
{
|
{
|
||||||
int i, ret, c1, c2;
|
int i, ret, c1, c2;
|
||||||
|
|
||||||
|
assert(nc > 0);
|
||||||
|
assert(nneigh > 0);
|
||||||
|
|
||||||
*pc2c = malloc((nc + 1) * sizeof **pc2c);
|
*pc2c = malloc((nc + 1) * sizeof **pc2c);
|
||||||
|
|
||||||
if (*pc2c != NULL) {
|
if (*pc2c != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user