UnstructuredGrid Struct Reference

#include <grid.h>

Public Attributes

int dimensions
 
int number_of_cells
 
int number_of_faces
 
int number_of_nodes
 
int * face_nodes
 
int * face_nodepos
 
int * face_cells
 
int * cell_faces
 
int * cell_facepos
 
double * node_coordinates
 
double * face_centroids
 
double * face_areas
 
double * face_normals
 
double * cell_centroids
 
double * cell_volumes
 
int * global_cell
 
int cartdims [3]
 
int * cell_facetag
 

Detailed Description

Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary number of adjacent cells. The struct contains both topological and geometrical data.

The grid consists of a set of cells, which are assumed to partion the grid domain. A face is defined as the nonempty intersection of (the closure of) two grid cells (the grid is a cell complex).

The topology information is limited to some adjacency relations between cells, faces and nodes only. The data structure does not contain any information pertaining to edges (except in 2d, where edges are the same as faces).

The geometry information is limited to centroids, areas/volumes and normals.

Member Data Documentation

int UnstructuredGrid::cartdims[3]

Contains the size of the logical cartesian structure (if any) of the grid.

This field is intended for grids that have a (possibly degenerate) logical cartesian structure, for example cornerpoint grids.

If the grid is unstructured (non-Cartesian), then at least one of the items in the (sub-)array cartdims[0..dimensions-1] could have the value 0 to signal this.

Referenced by Opm::extractColumn(), and Opm::initStateBasic().

double* UnstructuredGrid::cell_centroids

Exact or approximate cell centroids, stored consecutively for each cell. That is, for a cell c, cell_centroids[dimensions*c + d] contains the d'th coordinate of c's centroid. The size of the array is equal to (dimensions*number_of_cells).

Referenced by Opm::initBlackoilStateFromDeck(), Opm::initStateBasic(), Opm::initStateFromDeck(), Opm::CellQuadrature::quadPtCoord(), and Opm::CellQuadrature::quadPtWeight().

int* UnstructuredGrid::cell_facepos

For a cell c, cell_facepos[c] contains the starting index for c's faces in the cell_faces array. The size of the array is equal to (number_of_cells + 1).

Referenced by Opm::CellQuadrature::numQuadPts(), Opm::CellQuadrature::quadPtCoord(), and Opm::CellQuadrature::quadPtWeight().

int* UnstructuredGrid::cell_faces

Contains for each cell, the indices of its adjacent faces. The size of the array is equal to the sum over all cells of each cell's number of adjacent faces, which also is equal to cell_facepos[number_of_cells].

Referenced by Opm::CellQuadrature::numQuadPts(), Opm::CellQuadrature::quadPtCoord(), and Opm::CellQuadrature::quadPtWeight().

int* UnstructuredGrid::cell_facetag

If non-null, this array contains a number for cell-face adjacency indicating the face's position with respect to the cell, in a logical cartesian sense. The tags are in [0, ..., 5] meaning [I-, I+, J-, J+, K-, K+], where I, J, K are the logical cartesian principal directions. The structure of this array is identical to cell_faces, and cell_facepos indices into cell_facetag as well.

If non-null, the array size is equal to cell_facepos[number_of_cells].

This field is intended for grids that have a (possibly degenerate) logical cartesian structure, for example cornerpoint grids.

double* UnstructuredGrid::cell_volumes

Exact or approximate cell volumes. The size of the array is equal to number_of_cells.

Referenced by Opm::CellQuadrature::quadPtWeight().

int UnstructuredGrid::dimensions

The topological and geometrical dimensionality of the grid. Note that we do not support grids that are embedded in higher-dimensional spaces, such as 2d grids embedded in 3d. This number must be 2 or 3.

Referenced by Opm::CellQuadrature::CellQuadrature(), Opm::FaceQuadrature::FaceQuadrature(), Opm::initBlackoilStateFromDeck(), Opm::initStateBasic(), Opm::initStateFromDeck(), Opm::FaceQuadrature::numQuadPts(), Opm::CellQuadrature::numQuadPts(), Opm::FaceQuadrature::quadPtCoord(), Opm::CellQuadrature::quadPtCoord(), Opm::FaceQuadrature::quadPtWeight(), and Opm::CellQuadrature::quadPtWeight().

double* UnstructuredGrid::face_areas

Exact or approximate face areas. The size of the array is equal to number_of_faces.

Referenced by Opm::FaceQuadrature::quadPtWeight().

int* UnstructuredGrid::face_cells

For a face f, face_cells[2*f] and face_cells[2*f + 1] contain the cell indices of the cells adjacent to f. The number -1 indicates the outer boundary. The order is significant, as it gives the orientation: if face_cells[2*f] == a and face_cells[2*f + 1] == b, f is oriented from a to b. The inverse of this mapping is stored in cell_faces and cell_facepos. The size of the array is equal to (2*number_of_faces).

double* UnstructuredGrid::face_centroids

Exact or approximate face centroids, stored consecutively for each face. That is, for a face f, face_centroids[dimensions*f + d] contains the d'th coordinate of f's centroid. The size of the array is equal to (dimensions*number_of_faces).

Referenced by Opm::initBlackoilStateFromDeck(), Opm::initStateBasic(), Opm::initStateFromDeck(), Opm::FaceQuadrature::quadPtCoord(), Opm::CellQuadrature::quadPtCoord(), Opm::FaceQuadrature::quadPtWeight(), and Opm::CellQuadrature::quadPtWeight().

int* UnstructuredGrid::face_nodepos

For a face f, face_nodepos[f] contains the starting index for f's nodes in the face_nodes array. The size of the array is equal to (number_of_faces + 1).

Referenced by Opm::FaceQuadrature::numQuadPts(), Opm::CellQuadrature::numQuadPts(), Opm::FaceQuadrature::quadPtCoord(), Opm::CellQuadrature::quadPtCoord(), Opm::FaceQuadrature::quadPtWeight(), and Opm::CellQuadrature::quadPtWeight().

int* UnstructuredGrid::face_nodes

Contains for each face, the indices of its adjacent nodes. The size of the array is equal to the sum over all faces of each face's number of adjacent nodes, which also is equal to face_nodepos[number_of_faces].

Referenced by Opm::FaceQuadrature::quadPtCoord(), Opm::CellQuadrature::quadPtCoord(), Opm::FaceQuadrature::quadPtWeight(), and Opm::CellQuadrature::quadPtWeight().

double* UnstructuredGrid::face_normals

Exact or approximate face normals, stored consecutively for each face. That is, for a face f, face_normals[dimensions*f + d] contains the d'th coordinate of f's normal. The size of the array is equal to (dimensions*number_of_faces).

IMPORTANT: the normals are not normalized to have unit length! They are assumed to always have length equal to the corresponding face's area.

int* UnstructuredGrid::global_cell

If non-null, this array contains the logical cartesian indices (in a lexicographic ordering) of each cell. In that case, the array size is equal to number_of_cells.

This field is intended for grids that have a (possibly degenerate) logical cartesian structure, for example cornerpoint grids.

If null, this indicates that the element indices coincide with the logical cartesian indices, or that the grid has no inherent Cartesian structure. Due to this ambiguity, this field should not be used to check if the grid is Cartesian.

Referenced by Opm::extractColumn(), Opm::initBlackoilStateFromDeck(), Opm::initStateBasic(), and Opm::initStateFromDeck().

double* UnstructuredGrid::node_coordinates

Node coordinates, stored consecutively for each node. That is, for a node i, node_coordinates[dimensions*i + d] contains the d'th coordinate of node i. The size of the array is equal to (dimensions*number_of_nodes).

Referenced by Opm::FaceQuadrature::quadPtCoord(), Opm::CellQuadrature::quadPtCoord(), Opm::FaceQuadrature::quadPtWeight(), and Opm::CellQuadrature::quadPtWeight().

int UnstructuredGrid::number_of_faces

The number of faces in the grid.

Referenced by Opm::initBlackoilStateFromDeck(), Opm::initStateBasic(), and Opm::initStateFromDeck().

int UnstructuredGrid::number_of_nodes

The number of nodes in the grid.


The documentation for this struct was generated from the following file: