UnstructuredGrid Struct Reference

#include <UnstructuredGrid.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
 
double * zcorn
 

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

◆ cartdims

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::init().

◆ cell_centroids

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::centroids(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::init().

◆ cell_facepos

int* UnstructuredGrid::cell_facepos

◆ cell_faces

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::init(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::print(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::subEntitySeed().

◆ cell_facetag

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.

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::cartesianIndexInInside(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::indexInInside(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::indexInOutside(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::init().

◆ cell_volumes

double* UnstructuredGrid::cell_volumes

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

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::init(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::volumes().

◆ dimensions

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 GridAdapter::cellCentroid(), GridAdapter::faceCentroid(), GridAdapter::faceNormal(), and GridAdapter::vertexPosition().

◆ face_areas

double* UnstructuredGrid::face_areas

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

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::init(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::volumes().

◆ face_cells

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).

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::boundarySegmentIndex(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::init(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::isBoundaryFace(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::neighbor(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::outerNormal(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::unitOuterNormal().

◆ face_centroids

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::centroids(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::init().

◆ face_nodepos

◆ face_nodes

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::corner(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::init(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::print(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::subEntitySeed().

◆ face_normals

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.

Referenced by Dune::PolyhedralGrid< dim, dimworld, coord_t >::init(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::outerNormal().

◆ global_cell

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::globalCell(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::globalCellPtr().

◆ node_coordinates

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 Dune::PolyhedralGrid< dim, dimworld, coord_t >::centroids(), Dune::PolyhedralGrid< dim, dimworld, coord_t >::corner(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::init().

◆ number_of_cells

int UnstructuredGrid::number_of_cells

◆ number_of_faces

◆ number_of_nodes

int UnstructuredGrid::number_of_nodes

The number of nodes in the grid.

Referenced by GridAdapter::numVertices(), and Dune::PolyhedralGrid< dim, dimworld, coord_t >::size().

◆ zcorn

double* UnstructuredGrid::zcorn

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