Interface class to access the logical Cartesian grid as used in industry standard simulator decks. More...

#include <cartesianindexmapper.hh>

Classes

class  GlobalIndexDataHandle
 

Public Member Functions

 CartesianIndexMapper (const Grid &grid, const std::array< int, dimension > &cartDims, const std::vector< int > &cartesianIndex)
 constructor taking grid More...
 
const std::array< int,
dimension > & 
cartesianDimensions () const
 return Cartesian dimensions, i.e. number of cells in each direction More...
 
int cartesianSize () const
 return total number of cells in the logical Cartesian grid More...
 
int compressedSize () const
 return number of cells in the active grid More...
 
int cartesianIndex (const int compressedElementIndex) const
 return index of the cells in the logical Cartesian grid More...
 
int cartesianIndex (const std::array< int, dimension > &coords) const
 return index of the cells in the logical Cartesian grid More...
 
void cartesianCoordinate (const int compressedElementIndex, std::array< int, dimension > &coords) const
 return Cartesian coordinate, i.e. IJK, for a given cell More...
 
template<class GridView >
std::unique_ptr
< GlobalIndexDataHandle
< GridView > > 
dataHandle (const GridView &gridView)
 

Static Public Attributes

static const int dimension = Grid :: dimension
 dimension of the grid More...
 

Protected Member Functions

int computeCartesianSize () const
 

Protected Attributes

const Grid & grid_
 
const std::array< int, dimensioncartesianDimensions_
 
std::vector< int > cartesianIndex_
 
const int cartesianSize_
 

Detailed Description

template<class Grid>
class Dune::CartesianIndexMapper< Grid >

Interface class to access the logical Cartesian grid as used in industry standard simulator decks.

Constructor & Destructor Documentation

template<class Grid >
Dune::CartesianIndexMapper< Grid >::CartesianIndexMapper ( const Grid &  grid,
const std::array< int, dimension > &  cartDims,
const std::vector< int > &  cartesianIndex 
)
inline

constructor taking grid

Member Function Documentation

template<class Grid >
void Dune::CartesianIndexMapper< Grid >::cartesianCoordinate ( const int  compressedElementIndex,
std::array< int, dimension > &  coords 
) const
inline

return Cartesian coordinate, i.e. IJK, for a given cell

References Dune::CartesianIndexMapper< Grid >::cartesianDimensions(), and Dune::CartesianIndexMapper< Grid >::cartesianIndex().

template<class Grid >
const std::array<int, dimension>& Dune::CartesianIndexMapper< Grid >::cartesianDimensions ( ) const
inline
template<class Grid >
int Dune::CartesianIndexMapper< Grid >::cartesianIndex ( const int  compressedElementIndex) const
inline
template<class Grid >
int Dune::CartesianIndexMapper< Grid >::cartesianIndex ( const std::array< int, dimension > &  coords) const
inline

return index of the cells in the logical Cartesian grid

References Dune::CartesianIndexMapper< Grid >::cartesianDimensions(), and Dune::CartesianIndexMapper< Grid >::dimension.

template<class Grid >
int Dune::CartesianIndexMapper< Grid >::cartesianSize ( ) const
inline

return total number of cells in the logical Cartesian grid

References Dune::CartesianIndexMapper< Grid >::cartesianSize_.

template<class Grid >
int Dune::CartesianIndexMapper< Grid >::compressedSize ( ) const
inline

return number of cells in the active grid

References Dune::CartesianIndexMapper< Grid >::cartesianIndex_.

Referenced by Dune::CartesianIndexMapper< Grid >::cartesianIndex().

template<class Grid >
int Dune::CartesianIndexMapper< Grid >::computeCartesianSize ( ) const
inlineprotected
template<class Grid >
template<class GridView >
std::unique_ptr< GlobalIndexDataHandle< GridView > > Dune::CartesianIndexMapper< Grid >::dataHandle ( const GridView &  gridView)
inline

Member Data Documentation

template<class Grid >
const std::array<int, dimension> Dune::CartesianIndexMapper< Grid >::cartesianDimensions_
protected
template<class Grid >
const int Dune::CartesianIndexMapper< Grid >::cartesianSize_
protected
template<class Grid >
const int Dune::CartesianIndexMapper< Grid >::dimension = Grid :: dimension
static
template<class Grid >
const Grid& Dune::CartesianIndexMapper< Grid >::grid_
protected

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