GEOSX
Functions
StructuredGridUtilities.hpp File Reference

Go to the source code of this file.

Functions

template<int dim>
int StructuredGrid::dimpower (int n)
 Given n, compute n^d, where d is the spatial dimension. More...
 
template<int dim>
void StructuredGrid::map_index (const int index, const int nnx, std::vector< int > &indices)
 Given a lexicographical index, map back to the original i,j,k indices of the point. The first variation here assumes a uniform number of points nnx in all coordinate directions. More...
 

Function Documentation

◆ dimpower()

template<int dim>
int StructuredGrid::dimpower ( int  n)

Given n, compute n^d, where d is the spatial dimension.

Parameters
[in]nthe input integer whose power is computed here
Returns
the power of n

◆ map_index()

template<int dim>
void StructuredGrid::map_index ( const int  index,
const int  nnx,
std::vector< int > &  indices 
)

Given a lexicographical index, map back to the original i,j,k indices of the point. The first variation here assumes a uniform number of points nnx in all coordinate directions.

Template Parameters
dimthe number of spatial dimensions
Parameters
[in]indexthe lexicographical index
[in]nnxthe number of points in all coordinate directions
[out]indicesthe original (i,j,k) indices of the point