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