My Project
Loading...
Searching...
No Matches
UnstructuredGrid Struct Reference

Data structure for an unstructured grid, unstructured meaning that any cell may have an arbitrary number of adjacent cells. More...

#include <UnstructuredGrid.h>

Public Attributes

int dimensions
 The topological and geometrical dimensionality of the grid.
 
int number_of_cells
 The number of cells in the grid.
 
int number_of_faces
 The number of faces in the grid.
 
int number_of_nodes
 The number of nodes in the grid.
 
int * face_nodes
 Contains for each face, the indices of its adjacent nodes.
 
grid_size_t * face_nodepos
 For a face f, face_nodepos[f] contains the starting index for f's nodes in the face_nodes array.
 
int * 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.
 
int * cell_faces
 Contains for each cell, the indices of its adjacent faces.
 
grid_size_t * cell_facepos
 For a cell c, cell_facepos[c] contains the starting index for c's faces in the cell_faces array.
 
double * node_coordinates
 Node coordinates, stored consecutively for each node.
 
double * face_centroids
 Exact or approximate face centroids, stored consecutively for each face.
 
double * face_areas
 Exact or approximate face areas.
 
double * face_normals
 Exact or approximate face normals, stored consecutively for each face.
 
double * cell_centroids
 Exact or approximate cell centroids, stored consecutively for each cell.
 
double * cell_volumes
 Exact or approximate cell volumes.
 
int * global_cell
 If non-null, this array contains the logical cartesian indices (in a lexicographic ordering) of each cell.
 
int cartdims [3]
 Contains the size of the logical cartesian structure (if any) of the grid.
 
int * 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.
 
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.

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

◆ cell_facepos

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

◆ 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].

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

◆ cell_volumes

double* UnstructuredGrid::cell_volumes

Exact or approximate cell volumes.

The size of the array is equal to number_of_cells.

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

◆ face_areas

double* UnstructuredGrid::face_areas

Exact or approximate face areas.

The size of the array is equal to number_of_faces.

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

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

◆ face_nodepos

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

◆ 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].

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

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

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


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