source: XIOS/trunk/src/transformation/axis_algorithm_transformation.hpp @ 866

Last change on this file since 866 was 866, checked in by mhnguyen, 8 years ago

Reorganizing codes

+) Reorganize some structures to make them more performant

Test:
+) On Curie
+) All tests pass

File size: 2.1 KB
Line 
1/*!
2   \file axis_algorithm_transformation.hpp
3   \author Ha NGUYEN
4   \since 14 May 2015
5   \date 29 June 2015
6
7   \brief Interface for all axis transformation algorithms.
8 */
9#ifndef __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
10#define __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
11
12#include "generic_algorithm_transformation.hpp"
13#include "axis.hpp"
14
15namespace xios {
16
17/*!
18  \class CAxisAlgorithmTransformation
19  Algorithms for axis.
20*/
21class CAxisAlgorithmTransformation : public virtual CGenericAlgorithmTransformation
22{
23public:
24  CAxisAlgorithmTransformation(CAxis* axisDestination, CAxis* axisSource);
25
26  virtual ~CAxisAlgorithmTransformation();
27
28protected:
29  virtual void computeGlobalGridIndexFromGlobalIndexElement(int axisDestGlobalIndex,
30                                                        const std::vector<int>& axisSrcGlobalIndex,
31                                                        const std::vector<int>& destGlobalIndexPositionInGrid,
32                                                        int axisPositionInGrid,
33                                                        const std::vector<int>& gridDestGlobalDim,
34                                                        const std::vector<int>& gridSrcGlobalDim,
35                                                        const GlobalLocalMap& globalLocalIndexDestSendToServerMap,
36                                                        std::vector<std::pair<size_t,int> >& globalLocalIndexDestMap,
37                                                        std::vector<std::vector<size_t> >& globalIndexSrcGrid);
38
39  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
40
41  void computeExchangeGlobalIndex(const CArray<size_t,1>& globalAxisIndex,
42                                  CClientClientDHTInt::Index2VectorInfoTypeMap& globalDomainIndexOnProc);
43
44protected:
45  //! Global index of an axis on grid destination
46  std::vector<int> axisDestGlobalIndex_;
47
48  //! Size of
49  int axisDestGlobalSize_;
50
51    //! Axis on grid destination
52  CAxis* axisDest_;
53
54  //! Axis on grid source
55  CAxis* axisSrc_;
56};
57
58}
59#endif // __XIOS_AXIS_ALGORITHM_TRANSFORMATION_HPP__
Note: See TracBrowser for help on using the repository browser.