27 #ifndef SCHNEK_GRIDTRANSFORM_HPP_ 28 #define SCHNEK_GRIDTRANSFORM_HPP_ 39 typename Transformation
44 typedef BaseGrid BaseGridType;
45 typedef Transformation TransformationType;
47 BaseGridType *baseGrid;
48 Transformation transformation;
53 typedef typename BaseGridType::const_storage_iterator BaseIter;
58 : baseIter(baseIter), storage(storage) {}
64 {
return storage.transformation(*baseIter);}
73 {
return baseIter==SI.baseIter; }
76 {
return baseIter!=SI.baseIter; }
81 SCHNEK_INLINE T&
get(
const IndexType &index)
84 result = transformation(baseGrid->get(index));
88 SCHNEK_INLINE T
get(
const IndexType &index)
const 90 return transformation(baseGrid->get(index));
93 SCHNEK_INLINE
const IndexType& getLo()
const {
return baseGrid->getLo(); }
95 SCHNEK_INLINE
const IndexType& getHi()
const {
return baseGrid->getHi(); }
97 SCHNEK_INLINE
const IndexType& getDims()
const {
return baseGrid->getDims(); }
100 SCHNEK_INLINE
int getLo(
int k)
const {
return baseGrid->getLo(k); }
102 SCHNEK_INLINE
int getHi(
int k)
const {
return baseGrid->getHi(k); }
104 SCHNEK_INLINE
int getDims(
int k)
const {
return baseGrid->getDims(k); }
112 void setBaseGrid(BaseGridType &baseGrid_)
114 baseGrid = &baseGrid_;
117 Transformation getTransformation()
const 119 return transformation;
122 void setTransformation(
const Transformation &transformation)
124 this->transformation = transformation;
130 typename Transformation,
136 typename Transformation::value_type,
138 CheckingPolicy<BaseGrid::Rank>,
139 GridTransformStorage<
140 typename BaseGrid::value_type,
150 typename Transformation::value_type,
152 CheckingPolicy<BaseGrid::Rank>,
154 typename BaseGrid::value_type,
162 enum {Rank = BaseGrid::Rank};
163 typedef typename Transformation::value_type value_type;
164 typedef typename BaseGrid::IndexType IndexType;
165 typedef BaseGrid BaseGridType;
182 template<
typename SrcType,
typename DestType>
186 typedef DestType value_type;
188 DestType operator()(SrcType x) {
return (DestType)x; }
193 #include "gridtransform.t" 195 #endif // SCHNEK_SUBGRID_HPP_
The generic base class for the Grid class template.
Definition: grid.hpp:61
Definition: gridcheck.hpp:39