Changeset 622 for XIOS/trunk/src/filter/axis_inverse.cpp
- Timestamp:
- 06/22/15 13:36:27 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/filter/axis_inverse.cpp
r621 r622 4 4 5 5 CAxisInverse::CAxisInverse(CAxis* axisDestination, CAxis* axisSource) 6 : C ConcreteAlgo()6 : CAxisAlgorithmTransformation(axisDestination, axisSource) 7 7 { 8 8 if (axisDestination->size.getValue() != axisSource->size.getValue()) … … 20 20 21 21 for (int idx = 0; idx < niDest; ++idx) axisDestGlobalIndex_.push_back(ibeginDest+idx); 22 this->computeIndexSourceMapping(); 22 23 } 23 24 24 void CAxisInverse::computeIndexSourceMapping( const std::map<int, std::vector<int> >& transformationMappingOfPreviousAlgo)25 void CAxisInverse::computeIndexSourceMapping() 25 26 { 26 27 std::map<int, std::vector<int> >& transMap = this->transformationMapping_; 27 if (transformationMappingOfPreviousAlgo.empty()) 28 { 29 int globalIndexSize = axisDestGlobalIndex_.size(); 30 for (int idx = 0; idx < globalIndexSize; ++idx) 31 transMap[axisDestGlobalIndex_[idx]].push_back(axisDestGlobalSize_-axisDestGlobalIndex_[idx]-1); 32 } 33 else 34 { 35 std::map<int, std::vector<int> >::const_iterator itb = transformationMappingOfPreviousAlgo.begin(), it, 36 ite = transformationMappingOfPreviousAlgo.end(); 37 for (it = itb; it != ite; ++it) 38 { 39 transMap[it->first].push_back(axisDestGlobalSize_-it->first-1); 40 } 41 } 28 29 int globalIndexSize = axisDestGlobalIndex_.size(); 30 for (int idx = 0; idx < globalIndexSize; ++idx) 31 transMap[axisDestGlobalIndex_[idx]].push_back(axisDestGlobalSize_-axisDestGlobalIndex_[idx]-1); 42 32 } 43 33
Note: See TracChangeset
for help on using the changeset viewer.