Changeset 2009 for XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate.cpp
- Timestamp:
- 01/07/21 23:17:23 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_interpolate.cpp
r1988 r2009 51 51 52 52 CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(bool isSource, CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis) 53 : CA xisAlgorithmTransformation(isSource, axisDestination, axisSource), coordinate_(), transPosition_()53 : CAlgorithmTransformationWeight(isSource), coordinate_(), transPosition_(), axisSrc_(axisSource), axisDest_(axisDestination) 54 54 TRY 55 55 { 56 56 interpAxis->checkValid(axisSource); 57 axisDestination->checkAttributes() ; 58 57 59 order_ = interpAxis->order.getValue(); 58 60 if (!interpAxis->coordinate.isEmpty()) 59 61 { 60 62 coordinate_ = interpAxis->coordinate.getValue(); 61 this->idAuxInputs_.resize(1); 62 this->idAuxInputs_[0] = coordinate_; 63 } 63 // this->idAuxInputs_.resize(1); 64 // this->idAuxInputs_[0] = coordinate_; 65 } 66 std::vector<CArray<double,1>* > dataAuxInputs ; 67 computeRemap(dataAuxInputs) ; 68 this->computeAlgorithm(axisSource->getLocalView(CElementView::WORKFLOW), axisDestination->getLocalView(CElementView::WORKFLOW)) ; 64 69 } 65 70 CATCH … … 68 73 Compute the index mapping between axis on grid source and one on grid destination 69 74 */ 70 void CAxisAlgorithmInterpolate::compute IndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs)75 void CAxisAlgorithmInterpolate::computeRemap(const std::vector<CArray<double,1>* >& dataAuxInputs) 71 76 TRY 72 77 { … … 179 184 TRY 180 185 { 181 TransformationIndexMap& transMap = this->transformationMapping_ [transPos];182 TransformationWeightMap& transWeight = this->transformationWeight_ [transPos];186 TransformationIndexMap& transMap = this->transformationMapping_; 187 TransformationWeightMap& transWeight = this->transformationWeight_; 183 188 std::map<int, std::vector<std::pair<int,double> > >::const_iterator itb = interpolatingIndexValues.begin(), it, 184 189 ite = interpolatingIndexValues.end(); … … 205 210 transMap[globalIndexDest][idx] = index; 206 211 transWeight[globalIndexDest][idx] = weight; 212 /* 207 213 if (!transPosition_.empty()) 208 214 { 209 215 (this->transformationPosition_[transPos])[globalIndexDest] = transPosition_[transPos]; 210 216 } 211 } 212 } 217 */ 218 } 219 } 220 /* 213 221 if (!transPosition_.empty() && this->transformationPosition_[transPos].empty()) 214 222 (this->transformationPosition_[transPos])[0] = transPosition_[transPos]; 215 223 */ 216 224 } 217 225 CATCH … … 308 316 vecAxisValue[0].resize(axisSrc_->value.numElements()); 309 317 vecAxisValue[0] = axisSrc_->value; 310 this->transformationMapping_.resize(1);311 this->transformationWeight_.resize(1);318 // this->transformationMapping_.resize(1); 319 // this->transformationWeight_.resize(1); 312 320 } 313 321 else 314 322 { 323 /* 315 324 CField* field = CField::get(coordinate_); 316 325 CGrid* grid = field->getGrid(); … … 388 397 } 389 398 } 390 } 391 } 392 CATCH 393 394 } 399 */ 400 } 401 } 402 CATCH 403 404 }
Note: See TracChangeset
for help on using the changeset viewer.