- Timestamp:
- 01/23/19 10:31:44 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/src/transformation/axis_algorithm_reduce_axis.cpp
r1545 r1642 12 12 #include "grid.hpp" 13 13 #include "grid_transformation_factory_impl.hpp" 14 #include "reduction.hpp" 14 15 15 16 namespace xios { … … 23 24 std::map<int, int>& elementPositionInGridDst2AxisPosition, 24 25 std::map<int, int>& elementPositionInGridDst2DomainPosition) 26 TRY 25 27 { 26 28 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 33 35 return (new CAxisAlgorithmReduceAxis(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 34 36 } 37 CATCH 35 38 36 39 bool CAxisAlgorithmReduceAxis::registerTrans() 40 TRY 37 41 { 38 42 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_AXIS_TO_AXIS, create); 39 43 } 44 CATCH 40 45 41 46 42 47 CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo) 43 48 : CAxisAlgorithmTransformation(axisDestination, axisSource), reduction_(0) 49 TRY 44 50 { 45 51 eliminateRedondantSrc_= false ; … … 67 73 68 74 } 69 if(CReductionAlgorithm::ReductionOperations_ptr == 0)70 {71 CReductionAlgorithm::initReductionOperation();72 }73 75 74 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations _ptr->at(op));76 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 75 77 } 78 CATCH 76 79 77 80 void CAxisAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, … … 80 83 std::vector<bool>& flagInitial, 81 84 bool ignoreMissingValue, bool firstPass) 85 TRY 82 86 { 83 87 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 84 88 } 89 CATCH 85 90 86 91 void CAxisAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut) 92 TRY 87 93 { 88 94 reduction_->updateData(dataOut); 89 95 } 96 CATCH 90 97 91 98 CAxisAlgorithmReduceAxis::~CAxisAlgorithmReduceAxis() 99 TRY 92 100 { 93 101 if (0 != reduction_) delete reduction_; 94 102 } 103 CATCH 95 104 96 105 void CAxisAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 106 TRY 97 107 { 98 108 this->transformationMapping_.resize(1); … … 112 122 } 113 123 } 124 CATCH 114 125 115 126 }
Note: See TracChangeset
for help on using the changeset viewer.