/var/opm/opm-verteq/opm/verteq/topsurf.hpp

Indices of the columns' underlaying cells in the full grid.

Consecutive indices from the fine grid, not this one, for each of the columns, i.e. cells in this grid, as one flat list.

The values are sorted in z-order, starting from the top and moving downwards to the bottom. This is useful because you can keep a running counter for the depth, filling items as you go. (For this to be really useful, the original grid should be reordered so that cells in the z-direction are closer).

Use this field together with the col_cellpos to iterate through a column in the fine grid.

TopSurf* ts = ...;
rlw_int col_cells (ts->number_of_cells, ts->col_cellpos, ts->col_cells);
for (int col = 0; col < col_cells.cols(); ++col) {
for (int block = 0; block < col_cells.size (col); ++block) {
... col_cells[col][block] ...
}
}
const RunLenView< int > rlw_int
Definition: runlen.hpp:190
See also
TopSurf::column, TopSurf::col_cellpos
#ifndef OPM_VERTEQ_TOPSURF_HPP_INCLUDED
#define OPM_VERTEQ_TOPSURF_HPP_INCLUDED
// Copyright (C) 2013 Uni Research AS
// This file is licensed under the GNU General Public License v3.0
#ifndef OPM_GRID_HEADER_INCLUDED
#include <opm/core/grid.h>
#endif
namespace Opm {
struct TopSurf : public UnstructuredGrid {
virtual ~TopSurf ();
int* col_cells;
int* fine_col;
double* dz;
double* z0;
double* h;
double* h_tot;
static TopSurf* create (const UnstructuredGrid& fine);
private:
TopSurf ();
};
} // namespace Opm
#endif // OPM_VERTEQ_TOPSURF_HPP_INCLUDED
Definition: opmfwd.hpp:15
int * fine_col
Definition: topsurf.hpp:97
static TopSurf * create(const UnstructuredGrid &fine)
double * dz
Definition: topsurf.hpp:113
double * z0
Definition: topsurf.hpp:125
int * col_cells
Definition: topsurf.hpp:58
virtual ~TopSurf()
double * h_tot
Definition: topsurf.hpp:147
int * col_cellpos
Definition: topsurf.hpp:72
int max_vert_res
Definition: topsurf.hpp:82
double * h
Definition: topsurf.hpp:133