Changeset 827 for XIOS/trunk/src/transformation/axis_algorithm_inverse.cpp
- Timestamp:
- 03/23/16 16:10:45 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/axis_algorithm_inverse.cpp
r666 r827 25 25 } 26 26 27 this->computeIndexSourceMapping(); 27 // this->computeIndexSourceMapping(); 28 } 29 30 void CAxisAlgorithmInverse::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 31 { 32 this->transformationMapping_.resize(1); 33 this->transformationWeight_.resize(1); 34 35 std::map<int, std::vector<int> >& transMap = this->transformationMapping_[0]; 36 std::map<int, std::vector<double> >& transWeight = this->transformationWeight_[0]; 37 38 int globalIndexSize = axisDestGlobalIndex_.size(); 39 for (int idx = 0; idx < globalIndexSize; ++idx) 40 { 41 transMap[axisDestGlobalIndex_[idx]].push_back(axisDestGlobalSize_-axisDestGlobalIndex_[idx]-1); 42 transWeight[axisDestGlobalIndex_[idx]].push_back(1.0); 43 } 44 28 45 int niSrc = axisSrc_->n.getValue(); 29 46 int sizeSrc = axisSrc_->n_glo.getValue(); … … 35 52 axisDest_->value(idx) = axisSrc_->value(sizeSrc-idx-1); 36 53 } 37 }38 }39 40 void CAxisAlgorithmInverse::computeIndexSourceMapping()41 {42 std::map<int, std::vector<int> >& transMap = this->transformationMapping_;43 std::map<int, std::vector<double> >& transWeight = this->transformationWeight_;44 45 int globalIndexSize = axisDestGlobalIndex_.size();46 for (int idx = 0; idx < globalIndexSize; ++idx)47 {48 transMap[axisDestGlobalIndex_[idx]].push_back(axisDestGlobalSize_-axisDestGlobalIndex_[idx]-1);49 transWeight[axisDestGlobalIndex_[idx]].push_back(1.0);50 54 } 51 55 } … … 65 69 CTransformationMapping transformationMap(axisDest_, axisSrc_); 66 70 67 std::map<int, std::vector<int> >& transMap = this->transformationMapping_ ;68 std::map<int, std::vector<double> >& transWeight = this->transformationWeight_ ;71 std::map<int, std::vector<int> >& transMap = this->transformationMapping_[0]; 72 std::map<int, std::vector<double> >& transWeight = this->transformationWeight_[0]; 69 73 70 74 std::map<size_t, std::vector<std::pair<size_t,double> > > globaIndexMapFromDestToSource;
Note: See TracChangeset
for help on using the changeset viewer.