Made grid argument of compute_sequence() const.
This commit is contained in:
@@ -99,7 +99,7 @@ compute_reorder_sequence(int nc, int nf, int *cellfaces, int *faceptr, int *face
|
||||
free(work);
|
||||
}
|
||||
|
||||
void compute_sequence(struct UnstructuredGrid *grid, const double *flux,
|
||||
void compute_sequence(const struct UnstructuredGrid *grid, const double *flux,
|
||||
int *sequence,
|
||||
int *components, int *ncomponents)
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
struct UnstructuredGrid;
|
||||
void compute_sequence(struct UnstructuredGrid *grid, const double *flux,
|
||||
void compute_sequence(const struct UnstructuredGrid *grid, const double *flux,
|
||||
int *sequence, int *components, int *ncomponents);
|
||||
|
||||
|
||||
|
||||
@@ -89,8 +89,7 @@ void Opm::reorderTransportTwophase(const double *porevolume,
|
||||
std::vector<int> sequence(grid->number_of_cells);
|
||||
std::vector<int> components(grid->number_of_cells + 1);
|
||||
int ncomponents;
|
||||
compute_sequence(const_cast<UnstructuredGrid*>(grid),
|
||||
darcyflux, &sequence[0], &components[0], &ncomponents);
|
||||
compute_sequence(grid, darcyflux, &sequence[0], &components[0], &ncomponents);
|
||||
assert(ncomponents == grid->number_of_cells);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user