1 | /*! |
---|
2 | \file scalar_algorithm_transformation.hpp |
---|
3 | \author Ha NGUYEN |
---|
4 | \since 23 June 2016 |
---|
5 | \date 23 June 2016 |
---|
6 | |
---|
7 | \brief Interface for all scalar transformation algorithms. |
---|
8 | */ |
---|
9 | #ifndef __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__ |
---|
10 | #define __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__ |
---|
11 | |
---|
12 | #include "generic_algorithm_transformation.hpp" |
---|
13 | |
---|
14 | namespace xios { |
---|
15 | |
---|
16 | class CScalar; |
---|
17 | class CAxis; |
---|
18 | class CDomain; |
---|
19 | |
---|
20 | /*! |
---|
21 | \class CScalarAlgorithmTransformation |
---|
22 | Algorithms for scalar. |
---|
23 | */ |
---|
24 | class CScalarAlgorithmTransformation : public virtual CGenericAlgorithmTransformation |
---|
25 | { |
---|
26 | public: |
---|
27 | CScalarAlgorithmTransformation(CScalar* scalarDestination, CScalar* scalarSource); |
---|
28 | CScalarAlgorithmTransformation(CScalar* scalarDestination, CAxis* axisSource); |
---|
29 | CScalarAlgorithmTransformation(CScalar* scalarDestination, CDomain* domainSource); |
---|
30 | |
---|
31 | virtual ~CScalarAlgorithmTransformation(); |
---|
32 | |
---|
33 | virtual StdString getName() {return "Scalar Transformation";} |
---|
34 | |
---|
35 | protected: |
---|
36 | void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs); |
---|
37 | |
---|
38 | virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalScalarIndex, |
---|
39 | int elementType, |
---|
40 | CClientClientDHTInt::Index2VectorInfoTypeMap& globalScalarIndexOnProc); |
---|
41 | |
---|
42 | protected: |
---|
43 | //! Global index of an scalar on grid destination |
---|
44 | std::vector<int> scalarDestGlobalIndex_; |
---|
45 | |
---|
46 | //! Size of |
---|
47 | int scalarDestGlobalSize_; |
---|
48 | |
---|
49 | //! Scalar on grid destination |
---|
50 | CScalar* scalarDest_; |
---|
51 | |
---|
52 | //! Scalar on grid source |
---|
53 | CScalar* scalarSrc_; |
---|
54 | //! Axis source |
---|
55 | CAxis* axisSrc_; |
---|
56 | //! Domain source |
---|
57 | CDomain* domainSrc_; |
---|
58 | }; |
---|
59 | |
---|
60 | } |
---|
61 | #endif // __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__ |
---|