Ignore:
Timestamp:
12/11/18 13:22:07 (6 years ago)
Author:
oabramkina
Message:

Exception handling on trunk.

To activate it, compilation flag -DXIOS_EXCEPTION should be added.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp

    r1542 r1622  
    3434                                            std::vector<bool>& flagInitial, 
    3535                                            bool ignoreMissingValue, bool firstPass  ) 
     36TRY 
    3637{ 
    3738  int nbLocalIndex = localIndex.size();    
     
    6162  } 
    6263} 
     64CATCH 
    6365 
    6466void CGenericAlgorithmTransformation::computePositionElements(CGrid* dst, CGrid* src) 
     67TRY 
    6568{ 
    6669  int idxScalar = 0, idxAxis = 0, idxDomain = 0; 
     
    108111  } 
    109112} 
     113CATCH 
    110114 
    111115bool CGenericAlgorithmTransformation::isDistributedTransformation(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst) 
     116TRY 
    112117{ 
    113118 
     
    147152  } 
    148153  return isDistributed_ ; 
    149  
     154} 
     155CATCH 
     156 
    150157/*! 
    151158  This function computes the global indexes of grid source, which the grid destination is in demand. 
     
    160167                                                               CGrid* gridDst, 
    161168                                                               SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 
     169TRY 
    162170 { 
    163171  CContext* context = CContext::getCurrent(); 
     
    443451  }   
    444452 } 
     453CATCH 
    445454 
    446455/*! 
     
    461470                                                                   std::vector<std::unordered_map<int,std::vector<size_t> > >& globalElementIndexOnProc, 
    462471                                                                   SourceDestinationIndexMap& globaIndexWeightFromSrcToDst) 
     472TRY 
    463473{ 
    464474  SourceDestinationIndexMap globaIndexWeightFromSrcToDst_tmp ; 
     
    640650       } 
    641651     } 
    642  
    643 } 
     652} 
     653CATCH 
    644654 
    645655/*! 
     
    654664                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    655665                                                                 std::unordered_map<int,std::vector<size_t> >& globalScalarIndexOnProc) 
     666TRY 
    656667{ 
    657668  CContext* context = CContext::getCurrent(); 
     
    666677  } 
    667678} 
     679CATCH 
    668680 
    669681/*! 
     
    678690                                                               CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    679691                                                               std::unordered_map<int,std::vector<size_t> >& globalAxisIndexOnProc) 
     692TRY 
    680693{ 
    681694  CContext* context = CContext::getCurrent(); 
     
    735748  } 
    736749} 
     750CATCH 
    737751 
    738752/*! 
     
    747761                                                                 CArray<size_t,1>& destGlobalIndexPositionInGrid, 
    748762                                                                 std::unordered_map<int,std::vector<size_t> >& globalDomainIndexOnProc) 
     763TRY 
    749764{ 
    750765  CContext* context = CContext::getCurrent(); 
     
    838853  } 
    839854} 
    840  
    841  
    842  
    843  
    844  
     855CATCH 
    845856 
    846857void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst, 
    847858                                                                                 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, vector<bool>& localMaskOnGridDest) 
     859TRY 
    848860{ 
    849861 
     
    934946  } 
    935947 
    936  
    937  
    938  
    939  
    940  
    941948  vector<int> dstLocalInd ; 
    942949  int dimElement = axisDomainDstOrder(elementPositionInGrid); 
     
    10271034                
    10281035} 
    1029  
     1036CATCH 
    10301037 
    10311038void CGenericAlgorithmTransformation::nonDistributedrecursiveFunct(int currentPos, bool masked, int elementPositionInGrid, vector< CArray<bool,1>* >& maskSrc, vector< CArray<bool,1>* >& maskDst, int& srcInd, int& srcIndCompressed, vector<int>& nIndexSrc, int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd, 
    10321039                    vector<int>& localSrc, vector<int>& localDst, vector<double>& weight,  CArray<bool,1>& localMaskOnGridSrc, vector<bool>& localMaskOnGridDest ) 
     1040TRY 
    10331041{ 
    10341042  int masked_ ; 
     
    11191127 
    11201128} 
    1121  
    1122  
    1123  
    1124  
    1125  
    1126  
    1127  
    1128  
    1129  
    1130  
     1129CATCH 
    11311130 
    11321131/*! 
     
    11361135*/ 
    11371136void CGenericAlgorithmTransformation::computeIndexSourceMapping(const std::vector<CArray<double,1>* >& dataAuxInputs) 
     1137TRY 
    11381138{ 
    11391139  computeIndexSourceMapping_(dataAuxInputs); 
    11401140} 
     1141CATCH 
    11411142 
    11421143std::vector<StdString> CGenericAlgorithmTransformation::getIdAuxInputs() 
     1144TRY 
    11431145{ 
    11441146  return idAuxInputs_; 
    11451147} 
     1148CATCH 
    11461149 
    11471150CGenericAlgorithmTransformation::AlgoTransType CGenericAlgorithmTransformation::type() 
     1151TRY 
    11481152{ 
    11491153  return type_; 
    11501154} 
    1151  
    1152 } 
     1155CATCH 
     1156 
     1157} 
Note: See TracChangeset for help on using the changeset viewer.