Ignore:
Timestamp:
03/23/16 16:11:01 (8 years ago)
Author:
mhnguyen
Message:

Refactoring transformation code

+) On exchanging information during transformation, not only global index are sent but also local index
+) Correct a bug in distributed hash table (dht)
+) Add new type for dht
+) Clean up some redundant codes

Test
+) On Curie
+) Every test passes
+) Code runs faster in some cases (up to 30%)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/grid_transformation.hpp

    r827 r829  
    3535public: 
    3636  typedef std::list<std::pair<int,std::pair<ETranformationType,int> > > ListAlgoType; 
     37  typedef boost::unordered_map<size_t, std::vector<std::pair<int, std::pair<size_t,double> > > > DestinationIndexMap; 
    3738 
    3839public: 
     
    6364  void setUpGrid(int elementPositionInGrid, ETranformationType transType, int nbTransformation); 
    6465  void computeFinalTransformationMapping(); 
    65   void computeTransformationFromOriginalGridSource(const std::map<size_t, std::vector<std::pair<size_t,double> > >& globaIndexMapFromDestToSource); 
     66  void computeTransformationFromOriginalGridSource(const DestinationIndexMap& globaIndexMapFromDestToSource); 
    6667  void updateFinalGridDestination(); 
    6768  bool isSpecialTransformation(ETranformationType transType); 
     
    8485  int nbAlgos_; 
    8586 
    86   typedef std::map<size_t, std::vector<std::pair<size_t,double> > > GlobalIndexMap; 
    87  
    8887  // true if domain algorithm and false if axis algorithm (can be replaced by tuple with listAlgos_ 
    8988  std::vector<bool> algoTypes_; 
     
    105104 
    106105  //! (Grid) Global index of grid source 
    107   GlobalIndexMap currentGridIndexToOriginalGridIndex_; 
     106  DestinationIndexMap currentGridIndexToOriginalGridIndex_; 
    108107 
    109108  std::vector<CGrid*> tempGrids_; 
Note: See TracChangeset for help on using the changeset viewer.