Changeset 2291 for XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_axis.cpp
- Timestamp:
- 02/01/22 15:28:48 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/axis_algorithm/axis_algorithm_reduce_axis.cpp
r2270 r2291 12 12 #include "grid.hpp" 13 13 #include "grid_transformation_factory_impl.hpp" 14 #include "grid_algorithm_reduce.hpp" 14 15 15 16 … … 50 51 TRY 51 52 { 52 eliminateRedondantSrc_= false ; 53 if (!axisDestination->checkGeometricAttributes(false)) 54 { 55 axisDestination->resetGeometricAttributes(); 56 axisDestination->setGeometricAttributes(*axisSource) ; 57 } 58 axisDestination->checkAttributes() ; 53 59 algo->checkValid(axisDestination, axisSource); 54 axisDestination->checkAttributes() ;60 55 61 56 62 switch (algo->operation) … … 75 81 } 76 82 77 TransformationIndexMap& transMap = this->transformationMapping_; 78 CArray<int,1>& axisDstIndex = axisDestination->index; 79 int nbAxisIdx = axisDstIndex.numElements(); 80 for (int idxAxis = 0; idxAxis < nbAxisIdx; ++idxAxis) 83 //TransformationIndexMap& transMap = this->transformationMapping_; 84 //CArray<int,1>& axisDstIndex = axisDestination->index; 85 //int nbAxisIdx = axisDstIndex.numElements(); 86 87 88 89 auto& transMap = this->transformationMapping_; 90 91 CArray<size_t,1> dstGlobalIndex ; 92 axisDestination->getLocalView(CElementView::WORKFLOW)->getGlobalIndexView(dstGlobalIndex) ; 93 size_t nbIdx = dstGlobalIndex.numElements(); 94 95 for (size_t idx = 0; idx < nbIdx; ++idx) 81 96 { 82 int globalAxisIdx = axisDstIndex(idxAxis);83 transMap[global AxisIdx].resize(1);84 transMap[global AxisIdx][0]=globalAxisIdx ;97 size_t globalIdx = dstGlobalIndex(idx); 98 transMap[globalIdx].resize(1); 99 transMap[globalIdx][0]=globalIdx ; 85 100 } 86 101 87 88 axisDestination->checkAttributes() ;89 102 this->computeAlgorithm(axisSource->getLocalView(CElementView::WORKFLOW), axisDestination->getLocalView(CElementView::WORKFLOW)) ; 90 103 } 91 104 CATCH 92 105 106 shared_ptr<CGridAlgorithm> CAxisAlgorithmReduceAxis::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos) 107 { 108 auto algo=make_shared<CGridAlgorithmReduce>(gridSrc, gridDst, pos, shared_from_this(), operator_) ; 109 algo->computeAlgorithm(false) ; 110 return algo ; 111 } 93 112 94 113 CAxisAlgorithmReduceAxis::~CAxisAlgorithmReduceAxis()
Note: See TracChangeset
for help on using the changeset viewer.