- 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_scalar.cpp
r1601 r1646 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 ; … … 84 89 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations_ptr->at(op)); 85 90 } 91 CATCH 86 92 87 93 void CScalarAlgorithmReduceScalar::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut, 88 94 std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass) 95 TRY 89 96 { 90 97 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 91 98 } 99 CATCH 92 100 93 101 void CScalarAlgorithmReduceScalar::updateData(CArray<double,1>& dataOut) 102 TRY 94 103 { 95 104 reduction_->updateData(dataOut); 96 105 } 106 CATCH 97 107 98 108 CScalarAlgorithmReduceScalar::~CScalarAlgorithmReduceScalar() 109 TRY 99 110 { 100 111 if (0 != reduction_) delete reduction_; 101 112 } 113 CATCH 102 114 103 115 void CScalarAlgorithmReduceScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 116 TRY 104 117 { 105 118 this->transformationMapping_.resize(1); … … 113 126 114 127 } 128 CATCH 115 129 116 130 }
Note: See TracChangeset
for help on using the changeset viewer.