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;
56 : baseIter(baseIter) {}
62 {
return transformation(*baseIter);}
71 {
return baseIter==SI.baseIter; }
74 {
return baseIter!=SI.baseIter; }
79 T&
get(
const IndexType &index)
82 result = transformation(baseGrid->get(index));
86 T
get(
const IndexType &index)
const 88 return transformation(baseGrid->get(index));
91 const IndexType& getLo()
const {
return baseGrid->getLo(); }
93 const IndexType& getHi()
const {
return baseGrid->getHi(); }
95 const IndexType& getDims()
const {
return baseGrid->getDims(); }
98 int getLo(
int k)
const {
return baseGrid->getLo(k); }
100 int getHi(
int k)
const {
return baseGrid->getHi(k); }
102 int getDims(
int k)
const {
return baseGrid->getDims(k); }
110 void setBaseGrid(BaseGridType &baseGrid_)
112 baseGrid = &baseGrid_;
115 Transformation getTransformation()
const 117 return transformation;
120 void setTransformation(
const Transformation &transformation)
122 this->transformation = transformation;
128 typename Transformation,
134 typename Transformation::value_type,
136 CheckingPolicy<BaseGrid::Rank>,
137 GridTransformStorage<
138 typename BaseGrid::value_type,
148 typename Transformation::value_type,
150 CheckingPolicy<BaseGrid::Rank>,
152 typename BaseGrid::value_type,
160 enum {Rank = BaseGrid::Rank};
161 typedef typename Transformation::value_type value_type;
162 typedef typename BaseGrid::IndexType IndexType;
163 typedef BaseGrid BaseGridType;
180 template<
typename SrcType,
typename DestType>
184 typedef DestType value_type;
186 DestType operator()(SrcType x) {
return (DestType)x; }
191 #include "gridtransform.t" 193 #endif // SCHNEK_SUBGRID_HPP_
Definition: gridcheck.hpp:38