source: XIOS/trunk/src/transformation/domain_algorithm_transformation.hpp @ 668

Last change on this file since 668 was 668, checked in by mhnguyen, 9 years ago

Implementing some code factoring

+) Replace some slow searching function by faster ones

Test
+) On Curie
+) test_client and test_complete are correct

File size: 1.8 KB
Line 
1/*!
2   \file domain_algorithm_transformation.hpp
3   \author Ha NGUYEN
4   \since 02 Jul 2015
5   \date 02 Jul 2015
6
7   \brief Interface for all domain transformation algorithms.
8 */
9#ifndef __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__
10#define __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__
11
12#include "generic_algorithm_transformation.hpp"
13#include "domain.hpp"
14
15namespace xios {
16
17/*!
18  \class CDomainAlgorithmTransformation
19  Algorithms for domain.
20*/
21class CDomainAlgorithmTransformation : public virtual CGenericAlgorithmTransformation
22{
23public:
24  CDomainAlgorithmTransformation(CDomain* domainDestination, CDomain* domainSource);
25
26  virtual ~CDomainAlgorithmTransformation();
27
28protected:
29  virtual void computeGlobalGridIndexFromGlobalIndexElement(int domainDestGlobalIndex,
30                                                        const std::vector<int>& domainSrcGlobalIndex,
31                                                        int domainPositionInGrid,
32                                                        const std::vector<int>& gridDestGlobalDim,
33                                                        const std::vector<int>& gridSrcGlobalDim,
34                                                        const std::vector<size_t>& globalIndexGridDestSendToServer,
35                                                        CArray<size_t,1>& globalIndexDestGrid,
36                                                        std::vector<std::vector<size_t> >& globalIndexSrcGrid);
37  void computeIndexSourceMapping();
38
39protected:
40  inline void domainGlobalIndex(const int& index, const int& niGlob, const int& njGlob,
41                                int& iIndex, int& jIndex);
42
43protected:
44    //! Domain on grid destination
45  CDomain* domainDest_;
46
47  //! Domain on grid source
48  CDomain* domainSrc_;
49};
50
51}
52#endif // __XIOS_DOMAIN_ALGORITHM_TRANSFORMATION_HPP__
Note: See TracBrowser for help on using the repository browser.