- 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_scalar.cpp
r1314 r1612 22 22 std::map<int, int>& elementPositionInGridDst2AxisPosition, 23 23 std::map<int, int>& elementPositionInGridDst2DomainPosition) 24 TRY 24 25 { 25 26 std::vector<CScalar*> scalarListDestP = gridDst->getScalars(); … … 32 33 return (new CScalarAlgorithmReduceScalar(scalarListDestP[scalarDstIndex], scalarListSrcP[scalarSrcIndex], reduceScalar)); 33 34 } 35 CATCH 34 36 35 37 bool CScalarAlgorithmReduceScalar::registerTrans() 38 TRY 36 39 { 37 40 CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_SCALAR_TO_SCALAR, create); 38 41 } 42 CATCH 39 43 40 44 CScalarAlgorithmReduceScalar::CScalarAlgorithmReduceScalar(CScalar* scalarDestination, CScalar* scalarSource, CReduceScalarToScalar* algo) 41 45 : CScalarAlgorithmTransformation(scalarDestination, scalarSource), 42 46 reduction_(0) 47 TRY 43 48 { 44 49 eliminateRedondantSrc_= false ; … … 79 84 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 80 85 } 86 CATCH 81 87 82 88 void CScalarAlgorithmReduceScalar::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut, 83 89 std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass) 90 TRY 84 91 { 85 92 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 86 93 } 94 CATCH 87 95 88 96 void CScalarAlgorithmReduceScalar::updateData(CArray<double,1>& dataOut) 97 TRY 89 98 { 90 99 reduction_->updateData(dataOut); 91 100 } 101 CATCH 92 102 93 103 CScalarAlgorithmReduceScalar::~CScalarAlgorithmReduceScalar() 104 TRY 94 105 { 95 106 if (0 != reduction_) delete reduction_; 96 107 } 108 CATCH 97 109 98 110 void CScalarAlgorithmReduceScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 111 TRY 99 112 { 100 113 this->transformationMapping_.resize(1); … … 108 121 109 122 } 123 CATCH 110 124 111 125 }
Note: See TracChangeset
for help on using the changeset viewer.