- Timestamp:
- 11/23/18 14:48:14 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/transformation/scalar_algorithm_reduce_axis.cpp
r1297 r1612 27 27 std::map<int, int>& elementPositionInGridDst2AxisPosition, 28 28 std::map<int, int>& elementPositionInGridDst2DomainPosition) 29 TRY 29 30 { 30 31 std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); … … 37 38 return (new CScalarAlgorithmReduceAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 38 39 } 40 CATCH 39 41 40 42 bool CScalarAlgorithmReduceAxis::registerTrans() 43 TRY 41 44 { 42 45 CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_AXIS_TO_SCALAR, create); 43 46 } 47 CATCH 44 48 45 49 CScalarAlgorithmReduceAxis::CScalarAlgorithmReduceAxis(CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo) 46 50 : CScalarAlgorithmTransformation(scalarDestination, axisSource), 47 51 reduction_(0) 52 TRY 48 53 { 49 54 if (algo->operation.isEmpty()) … … 83 88 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 84 89 } 90 CATCH 85 91 86 92 void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut, 87 93 std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass) 94 TRY 88 95 { 89 96 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 90 97 } 98 CATCH 91 99 92 100 void CScalarAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut) 101 TRY 93 102 { 94 103 reduction_->updateData(dataOut); 95 104 } 105 CATCH 96 106 97 107 CScalarAlgorithmReduceAxis::~CScalarAlgorithmReduceAxis() 108 TRY 98 109 { 99 110 if (0 != reduction_) delete reduction_; 100 111 } 112 CATCH 101 113 102 114 void CScalarAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 115 TRY 103 116 { 104 117 this->transformationMapping_.resize(1); … … 116 129 } 117 130 } 131 CATCH 118 132 119 133 }
Note: See TracChangeset
for help on using the changeset viewer.