Remove references to sparse_table_t, as this is only used to allocate and free two data vectors.

Signed-off-by: Bård Skaflestad <Bard.Skaflestad@sintef.no>
This commit is contained in:
Jostein R. Natvig
2012-01-30 11:41:50 +00:00
committed by Bård Skaflestad
parent fdc8af50b6
commit 0f2cbf66a2

View File

@@ -41,7 +41,6 @@
#include <stdio.h>
#include "sparsetable.h"
#include "preprocess.h"
#include "uniquepoints.h"
@@ -262,16 +261,13 @@ int finduniquepoints(const struct grdecl *g,
/* ztab->data may need extra space temporarily due to simple boundary treatement */
int npillarpoints = 8*(nx+1)*(ny+1)*nz;
int npillars = (nx+1)*(ny+1);
sparse_table_t *ztab = malloc_sparse_table(npillars,
npillarpoints,
sizeof(double));
double *zlist = malloc(npillarpoints*sizeof *zlist);
int *zptr = malloc((npillars+1)*sizeof *zptr);
double *zlist = ztab->data; /* casting void* to double* */
int *zptr = ztab->ptr;
int i,j,k;
int d1[3];
@@ -350,9 +346,8 @@ int finduniquepoints(const struct grdecl *g,
}
}
free_sparse_table(ztab);
free(zptr);
free(zlist);
return 1;
}