Changeset 1612 for XIOS/dev/dev_olga/src/transformation
- Timestamp:
- 11/23/18 14:48:14 (5 years ago)
- Location:
- XIOS/dev/dev_olga/src/transformation
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/transformation/axis_algorithm_duplicate_scalar.cpp
r1314 r1612 21 21 std::map<int, int>& elementPositionInGridDst2AxisPosition, 22 22 std::map<int, int>& elementPositionInGridDst2DomainPosition) 23 TRY 23 24 { 24 25 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 31 32 return (new CAxisAlgorithmDuplicateScalar(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], duplicateScalar)); 32 33 } 34 CATCH 33 35 34 36 bool CAxisAlgorithmDuplicateScalar::registerTrans() 37 TRY 35 38 { 36 39 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_DUPLICATE_SCALAR_TO_AXIS, create); 37 40 } 41 CATCH 38 42 39 43 … … 50 54 51 55 void CAxisAlgorithmDuplicateScalar::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 56 TRY 52 57 { 53 58 this->transformationMapping_.resize(1); … … 69 74 } 70 75 } 71 76 CATCH 72 77 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_extract.cpp
r1558 r1612 19 19 std::map<int, int>& elementPositionInGridDst2AxisPosition, 20 20 std::map<int, int>& elementPositionInGridDst2DomainPosition) 21 TRY 21 22 { 22 23 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 29 30 return (new CAxisAlgorithmExtract(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 30 31 } 32 CATCH 33 31 34 bool CAxisAlgorithmExtract::registerTrans() 35 TRY 32 36 { 33 37 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_AXIS, create); 34 38 } 39 CATCH 35 40 36 41 CAxisAlgorithmExtract::CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis) 37 42 : CAxisAlgorithmTransformation(axisDestination, axisSource) 43 TRY 38 44 { 39 45 extractAxis->checkValid(axisSource); … … 104 110 } 105 111 } 112 CATCH 106 113 107 114 /*! -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_extract_domain.cpp
r1260 r1612 25 25 std::map<int, int>& elementPositionInGridDst2AxisPosition, 26 26 std::map<int, int>& elementPositionInGridDst2DomainPosition) 27 TRY 27 28 { 28 29 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 35 36 return (new CAxisAlgorithmExtractDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 36 37 } 38 CATCH 37 39 38 40 //bool CAxisAlgorithmExtractDomain::_dummyRegistered = CAxisAlgorithmExtractDomain::registerTrans(); 39 41 bool CAxisAlgorithmExtractDomain::registerTrans() 42 TRY 40 43 { 41 44 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_EXTRACT_DOMAIN_TO_AXIS, create); 42 45 } 46 CATCH 43 47 44 48 45 49 CAxisAlgorithmExtractDomain::CAxisAlgorithmExtractDomain(CAxis* axisDestination, CDomain* domainSource, CExtractDomainToAxis* algo) 46 50 : CAxisAlgorithmTransformation(axisDestination, domainSource), pos_(-1), reduction_(0) 51 TRY 47 52 { 48 53 algo->checkValid(axisDestination, domainSource); … … 64 69 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 65 70 } 71 CATCH 66 72 67 73 void CAxisAlgorithmExtractDomain::apply(const std::vector<std::pair<int,double> >& localIndex, … … 70 76 std::vector<bool>& flagInitial, 71 77 bool ignoreMissingValue, bool firstPass) 78 TRY 72 79 { 73 80 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 74 81 } 82 CATCH 75 83 76 84 CAxisAlgorithmExtractDomain::~CAxisAlgorithmExtractDomain() 85 TRY 77 86 { 78 87 if (0 != reduction_) delete reduction_; 79 88 } 89 CATCH 80 90 81 91 void CAxisAlgorithmExtractDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 92 TRY 82 93 { 83 94 this->transformationMapping_.resize(1); … … 117 128 {} 118 129 } 119 130 CATCH 120 131 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_interpolate.cpp
r1412 r1612 29 29 std::map<int, int>& elementPositionInGridDst2AxisPosition, 30 30 std::map<int, int>& elementPositionInGridDst2DomainPosition) 31 TRY 31 32 { 32 33 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 39 40 return (new CAxisAlgorithmInterpolate(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], interpolateAxis)); 40 41 } 42 CATCH 41 43 42 44 bool CAxisAlgorithmInterpolate::registerTrans() 45 TRY 43 46 { 44 47 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INTERPOLATE_AXIS, create); 45 48 } 46 49 CATCH 47 50 48 51 CAxisAlgorithmInterpolate::CAxisAlgorithmInterpolate(CAxis* axisDestination, CAxis* axisSource, CInterpolateAxis* interpAxis) 49 52 : CAxisAlgorithmTransformation(axisDestination, axisSource), coordinate_(), transPosition_() 53 TRY 50 54 { 51 55 interpAxis->checkValid(axisSource); … … 58 62 } 59 63 } 64 CATCH 60 65 61 66 /*! … … 63 68 */ 64 69 void CAxisAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 70 TRY 65 71 { 66 72 CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").resume() ; … … 88 94 CTimer::get("CAxisAlgorithmInterpolate::computeIndexSourceMapping_").suspend() ; 89 95 } 96 CATCH 90 97 91 98 /*! … … 98 105 const std::vector<int>& indexVec, 99 106 int transPos) 107 TRY 100 108 { 101 109 std::vector<double>::const_iterator itb = axisValue.begin(), ite = axisValue.end(); … … 162 170 computeWeightedValueAndMapping(interpolatingIndexValues, transPos); 163 171 } 172 CATCH 164 173 165 174 /*! … … 168 177 */ 169 178 void CAxisAlgorithmInterpolate::computeWeightedValueAndMapping(const std::map<int, std::vector<std::pair<int,double> > >& interpolatingIndexValues, int transPos) 179 TRY 170 180 { 171 181 TransformationIndexMap& transMap = this->transformationMapping_[transPos]; … … 205 215 206 216 } 217 CATCH 207 218 208 219 /*! … … 213 224 void CAxisAlgorithmInterpolate::retrieveAllAxisValue(const CArray<double,1>& axisValue, const CArray<bool,1>& axisMask, 214 225 std::vector<double>& recvBuff, std::vector<int>& indexVec) 226 TRY 215 227 { 216 228 CContext* context = CContext::getCurrent(); … … 282 294 } 283 295 } 296 CATCH 284 297 285 298 /*! … … 289 302 void CAxisAlgorithmInterpolate::fillInAxisValue(std::vector<CArray<double,1> >& vecAxisValue, 290 303 const std::vector<CArray<double,1>* >& dataAuxInputs) 304 TRY 291 305 { 292 306 if (coordinate_.empty()) … … 377 391 } 378 392 } 379 380 } 393 CATCH 394 395 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_inverse.cpp
r1542 r1612 27 27 std::map<int, int>& elementPositionInGridDst2AxisPosition, 28 28 std::map<int, int>& elementPositionInGridDst2DomainPosition) 29 TRY 29 30 { 30 31 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 37 38 return (new CAxisAlgorithmInverse(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], inverseAxis)); 38 39 } 40 CATCH 39 41 40 42 bool CAxisAlgorithmInverse::registerTrans() 43 TRY 41 44 { 42 45 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_INVERSE_AXIS, create); 43 46 } 44 47 CATCH 45 48 46 49 CAxisAlgorithmInverse::CAxisAlgorithmInverse(CAxis* axisDestination, CAxis* axisSource, CInverseAxis* inverseAxis) 47 50 : CAxisAlgorithmTransformation(axisDestination, axisSource) 51 TRY 48 52 { 49 53 if (axisDestination->n_glo.getValue() != axisSource->n_glo.getValue()) … … 55 59 } 56 60 } 61 CATCH 57 62 58 63 void CAxisAlgorithmInverse::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 64 TRY 59 65 { 60 66 this->transformationMapping_.resize(1); … … 82 88 } 83 89 } 90 CATCH 84 91 85 92 /*! … … 88 95 */ 89 96 void CAxisAlgorithmInverse::updateAxisValue() 97 TRY 90 98 { 91 99 CContext* context = CContext::getCurrent(); … … 282 290 delete [] itLong->second; 283 291 } 284 285 } 292 CATCH 293 294 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_reduce_axis.cpp
r1314 r1612 24 24 std::map<int, int>& elementPositionInGridDst2AxisPosition, 25 25 std::map<int, int>& elementPositionInGridDst2DomainPosition) 26 TRY 26 27 { 27 28 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 34 35 return (new CAxisAlgorithmReduceAxis(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], reduceAxis)); 35 36 } 37 CATCH 36 38 37 39 bool CAxisAlgorithmReduceAxis::registerTrans() 40 TRY 38 41 { 39 42 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_AXIS_TO_AXIS, create); 40 43 } 44 CATCH 41 45 42 46 43 47 CAxisAlgorithmReduceAxis::CAxisAlgorithmReduceAxis(CAxis* axisDestination, CAxis* axisSource, CReduceAxisToAxis* algo) 44 48 : CAxisAlgorithmTransformation(axisDestination, axisSource), reduction_(0) 49 TRY 45 50 { 46 51 eliminateRedondantSrc_= false ; … … 71 76 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 72 77 } 78 CATCH 73 79 74 80 void CAxisAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, … … 77 83 std::vector<bool>& flagInitial, 78 84 bool ignoreMissingValue, bool firstPass) 85 TRY 79 86 { 80 87 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 81 88 } 89 CATCH 82 90 83 91 void CAxisAlgorithmReduceAxis::updateData(CArray<double,1>& dataOut) 92 TRY 84 93 { 85 94 reduction_->updateData(dataOut); 86 95 } 96 CATCH 87 97 88 98 CAxisAlgorithmReduceAxis::~CAxisAlgorithmReduceAxis() 99 TRY 89 100 { 90 101 if (0 != reduction_) delete reduction_; 91 102 } 103 CATCH 92 104 93 105 void CAxisAlgorithmReduceAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 106 TRY 94 107 { 95 108 this->transformationMapping_.resize(1); … … 109 122 } 110 123 } 124 CATCH 111 125 112 126 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_reduce_domain.cpp
r1299 r1612 25 25 std::map<int, int>& elementPositionInGridDst2AxisPosition, 26 26 std::map<int, int>& elementPositionInGridDst2DomainPosition) 27 TRY 27 28 { 28 29 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 35 36 return (new CAxisAlgorithmReduceDomain(axisListDestP[axisDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 36 37 } 38 CATCH 37 39 38 40 bool CAxisAlgorithmReduceDomain::registerTrans() 41 TRY 39 42 { 40 43 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_REDUCE_DOMAIN_TO_AXIS, create); 41 44 } 45 CATCH 42 46 43 47 44 48 CAxisAlgorithmReduceDomain::CAxisAlgorithmReduceDomain(CAxis* axisDestination, CDomain* domainSource, CReduceDomainToAxis* algo) 45 49 : CAxisAlgorithmTransformation(axisDestination, domainSource), reduction_(0) 50 TRY 46 51 { 47 52 algo->checkValid(axisDestination, domainSource); … … 73 78 local = algo->local ; 74 79 } 80 CATCH 75 81 76 82 void CAxisAlgorithmReduceDomain::apply(const std::vector<std::pair<int,double> >& localIndex, … … 79 85 std::vector<bool>& flagInitial, 80 86 bool ignoreMissingValue, bool firstPass) 87 TRY 81 88 { 82 89 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 83 90 } 91 CATCH 84 92 85 93 void CAxisAlgorithmReduceDomain::updateData(CArray<double,1>& dataOut) 94 TRY 86 95 { 87 96 reduction_->updateData(dataOut); 88 97 } 98 CATCH 89 99 90 100 CAxisAlgorithmReduceDomain::~CAxisAlgorithmReduceDomain() 101 TRY 91 102 { 92 103 if (0 != reduction_) delete reduction_; 93 104 } 105 CATCH 94 106 95 107 void CAxisAlgorithmReduceDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 108 TRY 96 109 { 97 110 this->transformationMapping_.resize(1); … … 174 187 {} 175 188 } 189 CATCH 176 190 177 191 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_temporal_splitting.cpp
r1275 r1612 21 21 std::map<int, int>& elementPositionInGridDst2AxisPosition, 22 22 std::map<int, int>& elementPositionInGridDst2DomainPosition) 23 TRY 23 24 { 24 25 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 31 32 return (new CAxisAlgorithmTemporalSplitting(axisListDestP[axisDstIndex], scalarListSrcP[scalarSrcIndex], temporalSplitting)); 32 33 } 34 CATCH 33 35 34 36 bool CAxisAlgorithmTemporalSplitting::registerTrans() 37 TRY 35 38 { 36 39 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_TEMPORAL_SPLITTING, create); 37 40 } 38 41 CATCH 39 42 40 43 CAxisAlgorithmTemporalSplitting::CAxisAlgorithmTemporalSplitting(CAxis* axisDestination, CScalar* scalarSource, CTemporalSplitting* algo) … … 50 53 51 54 void CAxisAlgorithmTemporalSplitting::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 55 TRY 52 56 { 53 57 this->transformationMapping_.resize(1); … … 72 76 } 73 77 } 78 CATCH 74 79 75 80 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_transformation.cpp
r1403 r1612 20 20 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource) 21 21 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(axisSource), domainSrc_(0),scalarSrc_(0) 22 TRY 22 23 { 23 24 axisDestGlobalSize_ = axisDestination->n_glo.getValue(); … … 28 29 if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 29 30 } 31 CATCH 30 32 31 33 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CDomain* domainSource) 32 34 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(domainSource),scalarSrc_(0) 35 TRY 33 36 { 34 37 axisDestGlobalSize_ = axisDestination->n_glo.getValue(); … … 39 42 if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 40 43 } 44 CATCH 41 45 42 46 CAxisAlgorithmTransformation::CAxisAlgorithmTransformation(CAxis* axisDestination, CScalar* scalarSource) 43 47 : CGenericAlgorithmTransformation(), axisDest_(axisDestination), axisSrc_(0), domainSrc_(0), scalarSrc_(scalarSource) 48 TRY 44 49 { 45 50 axisDestGlobalSize_ = axisDestination->n_glo.getValue(); … … 50 55 if ((axisDestination->mask)(idx)) axisDestGlobalIndex_.push_back(ibeginDest+idx); 51 56 } 57 CATCH 58 52 59 CAxisAlgorithmTransformation::~CAxisAlgorithmTransformation() 53 60 { … … 66 73 int elementType, 67 74 CClientClientDHTInt::Index2VectorInfoTypeMap& globalAxisIndexOnProc) 75 TRY 68 76 { 69 77 CContext* context = CContext::getCurrent(); … … 124 132 globalAxisIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 125 133 } 134 CATCH 126 135 127 136 } -
XIOS/dev/dev_olga/src/transformation/axis_algorithm_zoom.cpp
r1559 r1612 19 19 std::map<int, int>& elementPositionInGridDst2AxisPosition, 20 20 std::map<int, int>& elementPositionInGridDst2DomainPosition) 21 TRY 21 22 { 22 23 std::vector<CAxis*> axisListDestP = gridDst->getAxis(); … … 29 30 return (new CAxisAlgorithmZoom(axisListDestP[axisDstIndex], axisListSrcP[axisSrcIndex], zoomAxis)); 30 31 } 32 CATCH 33 31 34 bool CAxisAlgorithmZoom::registerTrans() 35 TRY 32 36 { 33 37 CGridTransformationFactory<CAxis>::registerTransformation(TRANS_ZOOM_AXIS, create); 34 38 } 39 CATCH 35 40 36 41 CAxisAlgorithmZoom::CAxisAlgorithmZoom(CAxis* axisDestination, CAxis* axisSource, CZoomAxis* zoomAxis) 37 42 : CAxisAlgorithmTransformation(axisDestination, axisSource) 43 TRY 38 44 { 39 45 zoomAxis->checkValid(axisSource); … … 104 110 } 105 111 } 112 CATCH 106 113 107 114 /*! -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_compute_connectivity.cpp
r978 r1612 24 24 std::map<int, int>& elementPositionInGridDst2AxisPosition, 25 25 std::map<int, int>& elementPositionInGridDst2DomainPosition) 26 TRY 26 27 { 27 28 std::vector<CDomain*> domainListDestP = gridDst->getDomains(); … … 34 35 return (new CDomainAlgorithmComputeConnectivity(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], compute_connectivityDomain)); 35 36 } 37 CATCH 36 38 37 39 bool CDomainAlgorithmComputeConnectivity::registerTrans() 40 TRY 38 41 { 39 42 CGridTransformationFactory<CDomain>::registerTransformation(TRANS_COMPUTE_CONNECTIVITY_DOMAIN, create); 40 43 } 44 CATCH 41 45 42 46 CDomainAlgorithmComputeConnectivity::CDomainAlgorithmComputeConnectivity(CDomain* domainDestination, CDomain* domainSource, 43 47 CComputeConnectivityDomain* compute_connectivityDomain) 44 48 : CDomainAlgorithmTransformation(domainDestination, domainSource) 49 TRY 45 50 { 46 51 this->type_ = (ELEMENT_NO_MODIFICATION_WITHOUT_DATA); … … 64 69 computeLocalConnectivity(type, domainDestination, nbNeighborMax, nbNeighbor, localNeighbors); 65 70 } 71 CATCH 66 72 67 73 /*! … … 78 84 CArray<int,1>& nbConnectivity, 79 85 CArray<int,2>& localConnectivity) 86 TRY 80 87 { 81 88 … … 93 100 if (nbConnectivityMax < nbConnectivity(idx)) nbConnectivityMax = nbConnectivity(idx); 94 101 } 95 96 102 CATCH 97 103 98 104 /*! -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_expand.cpp
r1553 r1612 26 26 std::map<int, int>& elementPositionInGridDst2AxisPosition, 27 27 std::map<int, int>& elementPositionInGridDst2DomainPosition) 28 TRY 28 29 { 29 30 std::vector<CDomain*> domainListDestP = gridDst->getDomains(); … … 36 37 return (new CDomainAlgorithmExpand(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], expandDomain)); 37 38 } 39 CATCH 38 40 39 41 bool CDomainAlgorithmExpand::registerTrans() 42 TRY 40 43 { 41 44 CGridTransformationFactory<CDomain>::registerTransformation(TRANS_EXPAND_DOMAIN, create); 42 45 } 46 CATCH 43 47 44 48 CDomainAlgorithmExpand::CDomainAlgorithmExpand(CDomain* domainDestination, … … 47 51 : CDomainAlgorithmTransformation(domainDestination, domainSource), 48 52 isXPeriodic_(false), isYPeriodic_(false) 53 TRY 49 54 { 50 55 if (domainDestination == domainSource) … … 77 82 } 78 83 } 84 CATCH 79 85 80 86 /*! … … 85 91 void CDomainAlgorithmExpand::expandDomainEdgeConnectivity(CDomain* domainDestination, 86 92 CDomain* domainSource) 93 TRY 87 94 { 88 95 CContext* context = CContext::getCurrent(); … … 104 111 } 105 112 } 113 CATCH 106 114 107 115 /*! … … 112 120 void CDomainAlgorithmExpand::expandDomainNodeConnectivity(CDomain* domainDestination, 113 121 CDomain* domainSource) 122 TRY 114 123 { 115 124 CContext* context = CContext::getCurrent(); … … 131 140 } 132 141 } 142 CATCH 133 143 134 144 /*! … … 142 152 CDomain* domainSource, 143 153 CArray<int,2>& neighborsDomainSrc) 154 TRY 144 155 { 145 156 int index, globalIndex, idx; … … 455 466 domainDestination->computeLocalMask() ; 456 467 } 468 CATCH 457 469 458 470 /*! … … 466 478 CDomain* domainSource, 467 479 CArray<int,2>& neighborsDomainSrc) 480 TRY 468 481 { 469 482 … … 669 682 domainDestination->computeLocalMask() ; 670 683 } 671 684 CATCH 672 685 673 686 /*! -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_extract.cpp
r1553 r1612 16 16 std::map<int, int>& elementPositionInGridDst2AxisPosition, 17 17 std::map<int, int>& elementPositionInGridDst2DomainPosition) 18 TRY 18 19 { 19 20 std::vector<CDomain*> domainListDestP = gridDst->getDomains(); … … 26 27 return (new CDomainAlgorithmExtract(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], extractDomain)); 27 28 } 29 CATCH 28 30 29 31 bool CDomainAlgorithmExtract::registerTrans() 32 TRY 30 33 { 31 34 CGridTransformationFactory<CDomain>::registerTransformation(TRANS_EXTRACT_DOMAIN, create); 32 35 } 36 CATCH 33 37 34 38 CDomainAlgorithmExtract::CDomainAlgorithmExtract(CDomain* domainDestination, CDomain* domainSource, CExtractDomain* extractDomain) 35 39 : CDomainAlgorithmTransformation(domainDestination, domainSource) 40 TRY 36 41 { 37 42 extractDomain->checkValid(domainSource); … … 220 225 221 226 } 227 CATCH 222 228 223 229 /*! -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_generate_rectilinear.cpp
r1158 r1612 20 20 CGenerateRectilinearDomain* genRectDomain) 21 21 : CDomainAlgorithmTransformation(domainDestination, domainSource), nbDomainDistributedPart_(0) 22 TRY 22 23 { 23 24 type_ = ELEMENT_GENERATION; … … 30 31 fillInAttributesDomainDestination(); 31 32 } 33 CATCH 32 34 33 35 /*! … … 43 45 */ 44 46 void CDomainAlgorithmGenerateRectilinear::computeDistributionGridSource(CGrid* gridSrc) 47 TRY 45 48 { 46 49 CContext* context = CContext::getCurrent(); … … 94 97 } 95 98 } 99 CATCH 96 100 97 101 /*! … … 99 103 */ 100 104 void CDomainAlgorithmGenerateRectilinear::computeDistributionGridDestination(CGrid* gridDest) 105 TRY 101 106 { 102 107 // For now, just suppose that the grid contains only one domain … … 121 126 122 127 } 128 CATCH 123 129 124 130 /*! … … 126 132 */ 127 133 void CDomainAlgorithmGenerateRectilinear::fillInAttributesDomainDestination() 134 TRY 128 135 { 129 136 if (!domainDest_->distributionAttributesHaveValue()) … … 131 138 domainDest_->fillInLonLat(); 132 139 } 133 140 CATCH 134 141 } -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_interpolate.cpp
r1542 r1612 31 31 std::map<int, int>& elementPositionInGridDst2AxisPosition, 32 32 std::map<int, int>& elementPositionInGridDst2DomainPosition) 33 TRY 33 34 { 34 35 std::vector<CDomain*> domainListDestP = gridDst->getDomains(); … … 41 42 return (new CDomainAlgorithmInterpolate(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], interpolateDomain)); 42 43 } 44 CATCH 43 45 44 46 bool CDomainAlgorithmInterpolate::registerTrans() 47 TRY 45 48 { 46 49 CGridTransformationFactory<CDomain>::registerTransformation(TRANS_INTERPOLATE_DOMAIN, create); 47 50 } 51 CATCH 48 52 49 53 CDomainAlgorithmInterpolate::CDomainAlgorithmInterpolate(CDomain* domainDestination, CDomain* domainSource, CInterpolateDomain* interpDomain) 50 54 : CDomainAlgorithmTransformation(domainDestination, domainSource), interpDomain_(interpDomain), writeToFile_(false), readFromFile_(false) 55 TRY 51 56 { 52 57 CContext* context = CContext::getCurrent(); … … 93 98 94 99 } 100 CATCH 95 101 96 102 /*! … … 98 104 */ 99 105 void CDomainAlgorithmInterpolate::computeRemap() 106 TRY 100 107 { 101 108 using namespace sphereRemap; … … 399 406 400 407 } 408 CATCH 401 409 402 410 void CDomainAlgorithmInterpolate::processPole(std::map<int,std::vector<std::pair<int,double> > >& interMapValuePole, 403 411 int nbGlobalPointOnPole) 412 TRY 404 413 { 405 414 CContext* context = CContext::getCurrent(); … … 468 477 469 478 } 479 CATCH 470 480 471 481 /*! … … 473 483 */ 474 484 void CDomainAlgorithmInterpolate::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 485 TRY 475 486 { 476 487 if (readFromFile_) … … 481 492 } 482 493 } 494 CATCH 483 495 484 496 void CDomainAlgorithmInterpolate::writeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 497 TRY 485 498 { 486 499 writeInterpolationInfo(fileToReadWrite_, interpMapValue); 487 500 } 501 CATCH 488 502 489 503 void CDomainAlgorithmInterpolate::readRemapInfo() 504 TRY 490 505 { 491 506 std::map<int,std::vector<std::pair<int,double> > > interpMapValue; … … 494 509 exchangeRemapInfo(interpMapValue); 495 510 } 511 CATCH 496 512 497 513 void CDomainAlgorithmInterpolate::convertRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 514 TRY 498 515 { 499 516 CContext* context = CContext::getCurrent(); … … 520 537 } 521 538 } 539 CATCH 522 540 523 541 /*! … … 525 543 */ 526 544 void CDomainAlgorithmInterpolate::exchangeRemapInfo(std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 545 TRY 527 546 { 528 547 CContext* context = CContext::getCurrent(); … … 704 723 delete [] recvBuff; 705 724 } 725 CATCH 706 726 707 727 /*! Redefined some functions of CONetCDF4 to make use of them */ … … 710 730 int CDomainAlgorithmInterpolate::WriteNetCdf::addDimensionWrite(const StdString& name, 711 731 const StdSize size) 732 TRY 712 733 { 713 734 return CONetCDF4::addDimension(name, size); 714 735 } 736 CATCH 715 737 716 738 int CDomainAlgorithmInterpolate::WriteNetCdf::addVariableWrite(const StdString& name, nc_type type, 717 739 const std::vector<StdString>& dim) 740 TRY 718 741 { 719 742 return CONetCDF4::addVariable(name, type, dim); 720 743 } 744 CATCH 721 745 722 746 void CDomainAlgorithmInterpolate::WriteNetCdf::endDefinition() 747 TRY 723 748 { 724 749 CONetCDF4::definition_end(); 725 750 } 751 CATCH 726 752 727 753 void CDomainAlgorithmInterpolate::WriteNetCdf::writeDataIndex(const CArray<int,1>& data, const StdString& name, … … 729 755 const std::vector<StdSize>* start, 730 756 const std::vector<StdSize>* count) 757 TRY 731 758 { 732 759 CONetCDF4::writeData<int,1>(data, name, collective, record, start, count); 733 760 } 761 CATCH 734 762 735 763 void CDomainAlgorithmInterpolate::WriteNetCdf::writeDataIndex(const CArray<double,1>& data, const StdString& name, … … 737 765 const std::vector<StdSize>* start, 738 766 const std::vector<StdSize>* count) 767 TRY 739 768 { 740 769 CONetCDF4::writeData<double,1>(data, name, collective, record, start, count); 741 770 } 771 CATCH 742 772 743 773 /* … … 748 778 void CDomainAlgorithmInterpolate::writeInterpolationInfo(std::string& filename, 749 779 std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 780 TRY 750 781 { 751 782 CContext* context = CContext::getCurrent(); … … 827 858 netCdfWriter.closeFile(); 828 859 } 860 CATCH 829 861 830 862 /*! … … 836 868 void CDomainAlgorithmInterpolate::readInterpolationInfo(std::string& filename, 837 869 std::map<int,std::vector<std::pair<int,double> > >& interpMapValue) 870 TRY 838 871 { 839 872 int ncid ; … … 894 927 interpMapValue[dstIndex[ind]-indexOffset].push_back(make_pair(srcIndex[ind]-indexOffset,weight[ind])); 895 928 } 929 CATCH 896 930 897 931 void CDomainAlgorithmInterpolate::apply(const std::vector<std::pair<int,double> >& localIndex, … … 900 934 std::vector<bool>& flagInitial, 901 935 bool ignoreMissingValue, bool firstPass ) 936 TRY 902 937 { 903 938 int nbLocalIndex = localIndex.size(); … … 941 976 } 942 977 } 978 CATCH 943 979 944 980 void CDomainAlgorithmInterpolate::updateData(CArray<double,1>& dataOut) 981 TRY 945 982 { 946 983 if (detectMissingValue) … … 961 998 } 962 999 } 963 964 } 1000 CATCH 1001 1002 } -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_reorder.cpp
r1457 r1612 19 19 std::map<int, int>& elementPositionInGridDst2AxisPosition, 20 20 std::map<int, int>& elementPositionInGridDst2DomainPosition) 21 TRY 21 22 { 22 23 std::vector<CDomain*> domainListDestP = gridDst->getDomains(); … … 29 30 return (new CDomainAlgorithmReorder(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], reorderDomain)); 30 31 } 32 CATCH 31 33 32 34 bool CDomainAlgorithmReorder::registerTrans() 35 TRY 33 36 { 34 37 CGridTransformationFactory<CDomain>::registerTransformation(TRANS_REORDER_DOMAIN, create); 35 38 } 39 CATCH 36 40 37 41 CDomainAlgorithmReorder::CDomainAlgorithmReorder(CDomain* domainDestination, CDomain* domainSource, CReorderDomain* reorderDomain) 38 42 : CDomainAlgorithmTransformation(domainDestination, domainSource) 43 TRY 39 44 { 40 45 reorderDomain->checkValid(domainSource); … … 109 114 } 110 115 } 111 112 113 116 } 117 CATCH 114 118 115 119 /*! -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_transformation.cpp
r1403 r1612 36 36 int elementType, 37 37 CClientClientDHTInt::Index2VectorInfoTypeMap& globalDomainIndexOnProc) 38 TRY 38 39 { 39 40 CContext* context = CContext::getCurrent(); … … 65 66 globalDomainIndexOnProc = dhtIndexProcRank.getInfoIndexMap(); 66 67 } 68 CATCH 67 69 68 70 } -
XIOS/dev/dev_olga/src/transformation/domain_algorithm_zoom.cpp
r1609 r1612 16 16 std::map<int, int>& elementPositionInGridDst2AxisPosition, 17 17 std::map<int, int>& elementPositionInGridDst2DomainPosition) 18 TRY 18 19 { 19 20 std::vector<CDomain*> domainListDestP = gridDst->getDomains(); … … 26 27 return (new CDomainAlgorithmZoom(domainListDestP[domainDstIndex], domainListSrcP[domainSrcIndex], zoomDomain)); 27 28 } 29 CATCH 28 30 29 31 bool CDomainAlgorithmZoom::registerTrans() 32 TRY 30 33 { 31 34 CGridTransformationFactory<CDomain>::registerTransformation(TRANS_ZOOM_DOMAIN, create); 32 35 } 36 CATCH 33 37 34 38 CDomainAlgorithmZoom::CDomainAlgorithmZoom(CDomain* domainDestination, CDomain* domainSource, CZoomDomain* zoomDomain) 35 39 : CDomainAlgorithmTransformation(domainDestination, domainSource) 40 TRY 36 41 { 37 42 zoomDomain->checkValid(domainSource); … … 269 274 270 275 } 276 CATCH 271 277 272 278 /*! -
XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.cpp
r1599 r1612 34 34 std::vector<bool>& flagInitial, 35 35 bool ignoreMissingValue, bool firstPass ) 36 TRY 36 37 { 37 38 int nbLocalIndex = localIndex.size(); … … 61 62 } 62 63 } 64 CATCH 63 65 64 66 void CGenericAlgorithmTransformation::computePositionElements(CGrid* dst, CGrid* src) 67 TRY 65 68 { 66 69 int idxScalar = 0, idxAxis = 0, idxDomain = 0; … … 108 111 } 109 112 } 113 CATCH 110 114 111 115 bool CGenericAlgorithmTransformation::isDistributedTransformation(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst) 116 TRY 112 117 { 113 118 … … 147 152 } 148 153 return isDistributed_ ; 149 } 154 } 155 CATCH 156 150 157 /*! 151 158 This function computes the global indexes of grid source, which the grid destination is in demand. … … 160 167 CGrid* gridDst, 161 168 SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 169 TRY 162 170 { 163 171 CContext* context = CContext::getCurrent(); … … 443 451 } 444 452 } 453 CATCH 445 454 446 455 /*! … … 461 470 std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 462 471 SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 472 TRY 463 473 { 464 474 SourceDestinationIndexMap globaIndexWeightFromSrcToDst_tmp ; … … 640 650 } 641 651 } 642 643 } 652 } 653 CATCH 644 654 645 655 /*! … … 654 664 CArray<size_t,1>& destGlobalIndexPositionInGrid, 655 665 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc) 666 TRY 656 667 { 657 668 CContext* context = CContext::getCurrent(); … … 666 677 } 667 678 } 679 CATCH 668 680 669 681 /*! … … 678 690 CArray<size_t,1>& destGlobalIndexPositionInGrid, 679 691 std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc) 692 TRY 680 693 { 681 694 CContext* context = CContext::getCurrent(); … … 735 748 } 736 749 } 750 CATCH 737 751 738 752 /*! … … 747 761 CArray<size_t,1>& destGlobalIndexPositionInGrid, 748 762 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc) 763 TRY 749 764 { 750 765 CContext* context = CContext::getCurrent(); … … 838 853 } 839 854 } 840 841 842 843 855 CATCH 844 856 845 857 void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst, 846 858 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, 847 859 int& nlocalIndexDest) 860 TRY 848 861 { 849 862 … … 1010 1023 1011 1024 } 1025 CATCH 1012 1026 1013 1027 … … 1017 1031 int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd, 1018 1032 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight) 1033 TRY 1019 1034 { 1020 1035 int masked_ ; … … 1099 1114 1100 1115 } 1116 CATCH 1101 1117 1102 1118 /*! … … 1106 1122 */ 1107 1123 void CGenericAlgorithmTransformation::computeIndexSourceMapping(const std::vector<CArray<double,1>* >& dataAuxInputs) 1124 TRY 1108 1125 { 1109 1126 computeIndexSourceMapping_(dataAuxInputs); 1110 1127 } 1128 CATCH 1111 1129 1112 1130 std::vector<StdString> CGenericAlgorithmTransformation::getIdAuxInputs() 1131 TRY 1113 1132 { 1114 1133 return idAuxInputs_; 1115 1134 } 1135 CATCH 1116 1136 1117 1137 CGenericAlgorithmTransformation::AlgoTransType CGenericAlgorithmTransformation::type() 1138 TRY 1118 1139 { 1119 1140 return type_; 1120 1141 } 1121 1122 } 1142 CATCH 1143 1144 } -
XIOS/dev/dev_olga/src/transformation/grid_generate.cpp
r978 r1612 30 30 */ 31 31 void CGridGenerate::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 32 TRY 32 33 { 33 34 CGenericAlgorithmTransformation* algo = 0; 34 35 algoTransformation_.push_back(algo); 35 36 } 37 CATCH 36 38 37 39 /*! … … 43 45 */ 44 46 void CGridGenerate::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 47 TRY 45 48 { 46 49 CGenericAlgorithmTransformation* algo = 0; 47 50 algoTransformation_.push_back(algo); 48 51 } 52 CATCH 49 53 50 54 /*! … … 56 60 */ 57 61 void CGridGenerate::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 62 TRY 58 63 { 59 64 std::vector<CDomain*> domainListDestP = gridDestination_->getDomains(); … … 89 94 algoTransformation_.push_back(algo); 90 95 } 96 CATCH 91 97 92 98 /*! … … 94 100 */ 95 101 void CGridGenerate::completeGrid() 102 TRY 96 103 { 97 104 ListAlgoType::const_iterator itb = listAlgos_.begin(), … … 110 117 } 111 118 } 119 CATCH 112 120 113 121 } -
XIOS/dev/dev_olga/src/transformation/grid_transformation.cpp
r1589 r1612 38 38 */ 39 39 void CGridTransformation::selectScalarAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 40 TRY 40 41 { 41 42 std::vector<CScalar*> scaListDestP = gridDestination_->getScalars(); … … 59 60 algoTransformation_.push_back(algo); 60 61 } 62 CATCH 61 63 62 64 /*! … … 67 69 */ 68 70 void CGridTransformation::selectAxisAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 71 TRY 69 72 { 70 73 std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); … … 88 91 algoTransformation_.push_back(algo); 89 92 } 93 CATCH 90 94 91 95 /*! … … 96 100 */ 97 101 void CGridTransformation::selectDomainAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder) 102 TRY 98 103 { 99 104 std::vector<CDomain*> domainListDestP = gridDestination_->getDomains(); … … 117 122 algoTransformation_.push_back(algo); 118 123 } 124 CATCH 119 125 120 126 /*! … … 123 129 */ 124 130 std::map<int,std::pair<int,int> > CGridTransformation::getElementPosition(CGrid* grid) 131 TRY 125 132 { 126 133 std::vector<CScalar*> scalarListP = grid->getScalars(); … … 155 162 return elementPosition; 156 163 } 164 CATCH 157 165 158 166 /*! … … 163 171 */ 164 172 void CGridTransformation::setUpGridDestination(int elementPositionInGrid, ETranformationType transType) 173 TRY 165 174 { 166 175 if (isSpecialTransformation(transType)) return; … … 240 249 tempGridDests_.push_back(tmpGridDestination_); 241 250 } 251 CATCH 242 252 243 253 /*! … … 249 259 */ 250 260 void CGridTransformation::setUpGridSource(int elementPositionInGrid) 261 TRY 251 262 { 252 263 if (!tempGridSrcs_.empty() && (getNbAlgo()-1) == tempGridSrcs_.size()) … … 326 337 tempGridSrcs_.push_back(gridSource_); 327 338 } 339 CATCH 328 340 329 341 /*! … … 336 348 */ 337 349 void CGridTransformation::computeAll(const std::vector<CArray<double,1>* >& dataAuxInputs, Time timeStamp) 350 TRY 338 351 { 339 352 if (nbNormalAlgos_ < 1) return; … … 454 467 } 455 468 } 469 CATCH 456 470 457 471 /*! … … 460 474 */ 461 475 void CGridTransformation::computeTransformationMapping(const SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 476 TRY 462 477 { 463 478 CContext* context = CContext::getCurrent(); … … 682 697 683 698 } 699 CATCH 684 700 685 701 /*! … … 688 704 */ 689 705 const std::list<CGridTransformation::SendingIndexGridSourceMap>& CGridTransformation::getLocalIndexToSendFromGridSource() const 706 TRY 690 707 { 691 708 return localIndexToSendFromGridSource_; 692 709 } 710 CATCH 693 711 694 712 /*! … … 697 715 */ 698 716 const std::list<CGridTransformation::RecvIndexGridDestinationMap>& CGridTransformation::getLocalIndexToReceiveOnGridDest() const 717 TRY 699 718 { 700 719 return localIndexToReceiveOnGridDest_; 701 720 } 721 CATCH 702 722 703 723 /*! … … 706 726 */ 707 727 const std::list<size_t>& CGridTransformation::getNbLocalIndexToReceiveOnGridDest() const 728 TRY 708 729 { 709 730 return nbLocalIndexOnGridDest_; 710 731 } 711 712 } 732 CATCH 733 734 } -
XIOS/dev/dev_olga/src/transformation/grid_transformation_factory_impl.hpp
r933 r1612 110 110 } 111 111 112 113 112 } 114 113 #endif // __XIOS_GRID_TRANSFORMATION_FACTORY_HPP__ -
XIOS/dev/dev_olga/src/transformation/grid_transformation_selector.cpp
r1558 r1612 47 47 : gridSource_(source), gridDestination_(destination), isSameGrid_(false), 48 48 listAlgos_(), algoTypes_(), nbNormalAlgos_(0), nbSpecialAlgos_(0), auxInputs_() 49 TRY 49 50 { 50 51 if (0 == source) … … 62 63 initializeTransformations(type); 63 64 } 65 CATCH 64 66 65 67 /*! … … 70 72 */ 71 73 void CGridTransformationSelector::initializeTransformations(TransformationType type) 74 TRY 72 75 { 73 76 // Initialize algorithms … … 100 103 } 101 104 } 105 CATCH 102 106 103 107 CGridTransformationSelector::~CGridTransformationSelector() 108 TRY 104 109 { 105 110 std::vector<CGenericAlgorithmTransformation*>::const_iterator itb = algoTransformation_.begin(), it, … … 107 112 for (it = itb; it != ite; ++it) delete (*it); 108 113 } 114 CATCH 109 115 110 116 /*! … … 112 118 */ 113 119 void CGridTransformationSelector::updateElementPosition() 120 TRY 114 121 { 115 122 int idxScalar = 0, idxAxis = 0, idxDomain = 0; … … 163 170 } 164 171 } 172 CATCH 165 173 166 174 /*! … … 168 176 */ 169 177 void CGridTransformationSelector::initializeAlgorithms() 178 TRY 170 179 { 171 180 updateElementPosition(); … … 188 197 } 189 198 } 199 CATCH 190 200 191 201 /*! … … 197 207 */ 198 208 void CGridTransformationSelector::initializeScalarAlgorithms(int scalarPositionInGrid) 209 TRY 199 210 { 200 211 std::vector<CScalar*> scalarListDestP = gridDestination_->getScalars(); … … 229 240 } 230 241 } 242 CATCH 231 243 232 244 /*! … … 238 250 */ 239 251 void CGridTransformationSelector::initializeAxisAlgorithms(int axisPositionInGrid) 252 TRY 240 253 { 241 254 std::vector<CAxis*> axisListDestP = gridDestination_->getAxis(); … … 270 283 } 271 284 } 285 CATCH 272 286 273 287 /*! … … 278 292 */ 279 293 void CGridTransformationSelector::initializeDomainAlgorithms(int domPositionInGrid) 294 TRY 280 295 { 281 296 std::vector<CDomain*> domListDestP = gridDestination_->getDomains(); … … 309 324 } 310 325 } 311 312 } 326 } 327 CATCH 313 328 314 329 /*! … … 321 336 */ 322 337 void CGridTransformationSelector::selectAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder, int algoType) 338 TRY 323 339 { 324 340 updateElementPosition(); … … 338 354 } 339 355 } 356 CATCH 340 357 341 358 bool CGridTransformationSelector::isSpecialTransformation(ETranformationType transType) 359 TRY 342 360 { 343 361 bool res = false; … … 353 371 return res; 354 372 } 355 356 } 373 CATCH 374 375 } -
XIOS/dev/dev_olga/src/transformation/scalar_algorithm_extract_axis.cpp
r1260 r1612 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 CScalarAlgorithmExtractAxis(scalarListDestP[scalarDstIndex], axisListSrcP[axisSrcIndex], extractAxis)); 37 38 } 39 CATCH 38 40 39 41 bool CScalarAlgorithmExtractAxis::registerTrans() 42 TRY 40 43 { 41 44 CGridTransformationFactory<CScalar>::registerTransformation(TRANS_EXTRACT_AXIS_TO_SCALAR, create); 42 45 } 46 CATCH 43 47 44 48 CScalarAlgorithmExtractAxis::CScalarAlgorithmExtractAxis(CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo) 45 49 : CScalarAlgorithmTransformation(scalarDestination, axisSource), 46 50 reduction_(0) 51 TRY 47 52 { 48 53 algo->checkValid(scalarDestination, axisSource); … … 51 56 reduction_ = CReductionAlgorithm::createOperation(CReductionAlgorithm::ReductionOperations[op]); 52 57 } 58 CATCH 53 59 54 60 void CScalarAlgorithmExtractAxis::apply(const std::vector<std::pair<int,double> >& localIndex, … … 57 63 std::vector<bool>& flagInitial, 58 64 bool ignoreMissingValue, bool firstPass) 65 TRY 59 66 { 60 67 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 61 68 } 69 CATCH 62 70 63 71 CScalarAlgorithmExtractAxis::~CScalarAlgorithmExtractAxis() 72 TRY 64 73 { 65 74 if (0 != reduction_) delete reduction_; 66 75 } 76 CATCH 67 77 68 78 void CScalarAlgorithmExtractAxis::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 79 TRY 69 80 { 70 81 this->transformationMapping_.resize(1); … … 77 88 transWeight[0].push_back(1.0); 78 89 } 90 CATCH 79 91 80 92 } -
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 } -
XIOS/dev/dev_olga/src/transformation/scalar_algorithm_reduce_domain.cpp
r1396 r1612 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 CScalarAlgorithmReduceDomain(scalarListDestP[scalarDstIndex], domainListSrcP[domainSrcIndex], reduceDomain)); 37 38 } 39 CATCH 38 40 39 41 bool CScalarAlgorithmReduceDomain::registerTrans() 42 TRY 40 43 { 41 44 CGridTransformationFactory<CScalar>::registerTransformation(TRANS_REDUCE_DOMAIN_TO_SCALAR, create); 42 45 } 46 CATCH 43 47 44 48 CScalarAlgorithmReduceDomain::CScalarAlgorithmReduceDomain(CScalar* scalarDestination, CDomain* domainSource, CReduceDomainToScalar* algo) 45 49 : CScalarAlgorithmTransformation(scalarDestination, domainSource), 46 50 reduction_(0) 51 TRY 47 52 { 48 53 algo->checkValid(scalarDestination, domainSource); … … 80 85 local = algo->local ; 81 86 } 87 CATCH 82 88 83 89 void CScalarAlgorithmReduceDomain::apply(const std::vector<std::pair<int,double> >& localIndex, … … 86 92 std::vector<bool>& flagInitial, 87 93 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 CScalarAlgorithmReduceDomain::updateData(CArray<double,1>& dataOut) 101 TRY 93 102 { 94 103 reduction_->updateData(dataOut); 95 104 } 105 CATCH 96 106 97 107 CScalarAlgorithmReduceDomain::~CScalarAlgorithmReduceDomain() 108 TRY 98 109 { 99 110 if (0 != reduction_) delete reduction_; 100 111 } 112 CATCH 101 113 102 114 void CScalarAlgorithmReduceDomain::computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs) 115 TRY 103 116 { 104 117 this->transformationMapping_.resize(1); … … 137 150 138 151 } 152 CATCH 139 153 140 154 } -
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 } -
XIOS/dev/dev_olga/src/transformation/scalar_algorithm_transformation.cpp
r1403 r1612 57 57 int elementSourceType, 58 58 CClientClientDHTInt::Index2VectorInfoTypeMap& globalIndexElementSourceOnProc) 59 TRY 59 60 { 60 61 CContext* context = CContext::getCurrent(); … … 121 122 } 122 123 } 123 124 CATCH 124 125 }
Note: See TracChangeset
for help on using the changeset viewer.