Ignore:
Timestamp:
04/26/16 16:03:51 (8 years ago)
Author:
mhnguyen
Message:

Changing the way to create virtual grid during transformation.

+)Instead of establishing relation between source grid of current transformation and
the original source grid (source grid of the first transformation), each transformation
keeps its list of source grid and destination, which will be used in interpolation.
+) Clean some redundant codes

Test
+) All official tests pass
+) interpolation tests pass

File:
1 edited

Legend:

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

    r832 r841  
    3737  typedef std::list<std::pair<int,std::pair<ETranformationType,int> > > ListAlgoType; 
    3838  typedef boost::unordered_map<size_t, std::vector<std::pair<int, std::pair<size_t,double> > > > DestinationIndexMap; 
     39  typedef std::map<int, CArray<int,1> > SendingIndexGridSourceMap; 
     40  typedef std::map<int,std::vector<std::vector<std::pair<int,double> > > > RecvIndexGridDestinationMap; 
    3941 
    4042public: 
     
    4547  void computeAll(const std::vector<CArray<double,1>* >& dataAuxInput=std::vector<CArray<double,1>* >(), Time timeStamp = 0); 
    4648 
    47   const std::map<int, CArray<int,1> >& getLocalIndexToSendFromGridSource() const; 
    48   const std::map<int, std::vector<std::vector<std::pair<int,double> > > >& getLocalIndexToReceiveOnGridDest() const; 
     49  const std::list<SendingIndexGridSourceMap>& getLocalIndexToSendFromGridSource() const; 
     50  const std::list<RecvIndexGridDestinationMap>& getLocalIndexToReceiveOnGridDest() const; 
     51  const std::list<size_t>& getNbLocalIndexToReceiveOnGridDest() const; 
     52 
    4953  CGrid* getGridSource() { return originalGridSource_; } 
    5054  CGrid* getGridDestination() { return gridDestination_; } 
     
    6468  void selectAlgo(int elementPositionInGrid, ETranformationType transType, int transformationOrder, bool isDomainAlgo); 
    6569  void setUpGrid(int elementPositionInGrid, ETranformationType transType, int nbTransformation); 
    66   void computeFinalTransformationMapping(); 
    67   void computeTransformationFromOriginalGridSource(const DestinationIndexMap& globaIndexMapFromDestToSource); 
    68   void updateFinalGridDestination(); 
     70//  void computeFinalTransformationMapping(); 
     71//  void computeTransformationFromOriginalGridSource(const DestinationIndexMap& globaIndexMapFromDestToSource); 
     72  void computeTransformationMapping(const DestinationIndexMap& globalIndexWeightFromDestToSource); 
     73//  void updateFinalGridDestination(); 
    6974  bool isSpecialTransformation(ETranformationType transType); 
    7075 
     
    96101 
    97102  //! Local index of data to send from grid source 
    98   std::map<int, CArray<int,1> > localIndexToSendFromGridSource_; 
     103  std::list<SendingIndexGridSourceMap> localIndexToSendFromGridSource_; 
    99104 
    100105  //! Local index of data to receive on grid destination 
    101   std::map<int,std::vector<std::vector<std::pair<int,double> > > > localIndexToReceiveOnGridDest_; 
     106  std::list<RecvIndexGridDestinationMap> localIndexToReceiveOnGridDest_; 
     107 
     108  //! Number of local index of data to receive on grid destination 
     109  std::list<size_t> nbLocalIndexOnGridDest_; 
    102110 
    103111  //! Position of axis and domain in grid 
Note: See TracChangeset for help on using the changeset viewer.