Ignore:
Timestamp:
06/22/15 13:36:31 (9 years ago)
Author:
mhnguyen
Message:

Implementing transformation algorithm: zoom axis (local commit)

+) Implement zoom axis: zoomed points are points not masked
+) Correct some minor bugs

Test
+) Ok with normal cases: zoom in the last of transformation list
+) There is still a bug in case of zoom then inverse

File:
1 edited

Legend:

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

    r622 r623  
     1/*! 
     2   \file grid_transformation.hpp 
     3   \author Ha NGUYEN 
     4   \since 14 May 2015 
     5   \date 09 June 2015 
     6 
     7   \brief Interface for all transformations. 
     8 */ 
    19#ifndef __XIOS_GRID_TRANSFORMATION_HPP__ 
    210#define __XIOS_GRID_TRANSFORMATION_HPP__ 
     
    1220class CGrid; 
    1321 
     22/*! 
     23  \class CGridTransformation 
     24  This class is an interface for all transformations to interact with the rest of XIOS. 
     25The class, firstly, tries to get all information relating to requested transformations by retrieving directly from grid. 
     26Then with all these information, all necessary transformations will be be created by generic class \class CGenericAlgorithmTransformation. 
     27Because there are information exchange among clients to accomplish the transformations (e.g: some index need retrieving from other clients), 
     28this class uses class \class CTransformationMapping to fulfill this demand. 
     29For each transformation, a new temporary grid source is created. 
     30For a consequential transformations (e.g: inversing -> zoom -> inversing -> ...), 
     31the grid destination of current transformation will be grid source of the next transformation 
     32*/ 
    1433class CGridTransformation 
    1534{ 
     
    3857  void computeFinalTransformationMapping(); 
    3958  void computeTransformationFromOriginalGridSource(const std::map<size_t, std::set<size_t> >& globaIndexMapFromDestToSource); 
     59  void updateFinalGridDestination(); 
    4060 
    4161private: 
     62  //! Grid source on transformation 
    4263  CGrid* gridSource_; 
     64 
     65  //! Grid destination on transformation 
    4366  CGrid* gridDestination_; 
     67 
     68  //! The grid source of the first transformation (original grid source) 
    4469  CGrid* originalGridSource_; 
    4570 
     71  //! Grid source dimension size 
    4672  std::vector<int> gridSourceDimensionSize_; 
     73 
     74  //! Grid destination dimension size 
    4775  std::vector<int> gridDestinationDimensionSize_; 
    4876 
    4977private: 
    5078  typedef std::list<std::pair<int,std::pair<ETranformationType,int> > > ListAlgoType; 
     79  //! List of algorithm types and their order 
     80  ListAlgoType listAlgos_; 
    5181 
    5282  // Mapping between position of an element in grid and its transformation (if any) 
    5383  std::list<CGenericAlgorithmTransformation*> algoTransformation_; 
    54   ListAlgoType listAlgos_; 
     84 
     85  //! Mapping of (grid) global index representing tranformation. 
    5586  std::map<size_t, std::set<size_t> > globaIndexMapFromDestToSource_; 
    5687 
     88  //! Local index of data to send from grid source 
    5789  std::map<int, CArray<int,1>* > localIndexToSendFromGridSource_; 
     90 
     91  //! Local index of data to receive on grid destination 
    5892  std::map<int, std::vector<CArray<int,1>* > > localIndexToReceiveOnGridDest_; 
    5993 
     94  //! Position of axis and domain in grid 
    6095  std::map<int, int> elementPosition2AxisPositionInGrid_, elementPosition2DomainPositionInGrid_; 
    6196 
     97  //! (Grid) Global index of grid source 
    6298  CArray<size_t,1>* globalIndexOfCurrentGridSource_; 
    6399  CArray<size_t,1>* globalIndexOfOriginalGridSource_; 
Note: See TracChangeset for help on using the changeset viewer.