16 #ifndef GEOS_MESH_UTILITIES_STRUCTUREDGRIDUTILITIES_HPP 
   17 #define GEOS_MESH_UTILITIES_STRUCTUREDGRIDUTILITIES_HPP 
   27 namespace structuredGrid
 
   40 template<> 
inline int dimpower< 1 >( 
int n ) { 
return n; }
 
   41 template<> 
inline int dimpower< 2 >( 
int n ) { 
return n*n; }
 
   42 template<> 
inline int dimpower< 3 >( 
int n ) { 
return n*n*n; }
 
   58                 stdVector< int > & indices );
 
   64 void map_index< 1 >( 
const int index,
 
   66                      stdVector< int > & indices )
 
   75 void map_index< 2 >( 
const int index,
 
   77                      stdVector< int > & indices )
 
   80   indices[0] = index % nnx;
 
   81   indices[1] = index / nnx;
 
   86 void map_index< 3 >( 
const int index,
 
   88                      stdVector< int > & indices )
 
   91   indices[0] = index % nnx;
 
   92   indices[1] = (index / nnx) % nnx;
 
   93   indices[2] = index / (nnx*nnx);
 
#define GEOS_DEBUG_VAR(...)
Mark a debug variable and silence compiler warnings.
 
#define GEOS_ASSERT_GT(lhs, rhs)
Assert that one value compares greater than the other in debug builds.
 
int dimpower(int n)
Given n, compute n^dim, where dim is the spatial dimension.
 
void map_index(const int index, const int nnx, stdVector< int > &indices)
Given a lexicographical index, map back to the original i,j,k indices of the point....