source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_transformation.hpp @ 1988

Last change on this file since 1988 was 1988, checked in by ymipsl, 3 years ago

Update to new transformation.
Source filter working again + reading
YM

File size: 1.6 KB
Line 
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
14namespace xios {
15
16class CScalar;
17class CAxis;
18class CDomain;
19
20/*!
21  \class CScalarAlgorithmTransformation
22  Algorithms for scalar.
23*/
24class CScalarAlgorithmTransformation : public /*virtual*/ CGenericAlgorithmTransformation
25{
26public:
27  CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CScalar* scalarSource);
28  CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CAxis* axisSource);
29  CScalarAlgorithmTransformation(bool isSource, CScalar* scalarDestination, CDomain* domainSource);
30
31  virtual ~CScalarAlgorithmTransformation();
32
33protected:
34  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
35
36  virtual void computeExchangeGlobalIndex(const CArray<size_t,1>& globalScalarIndex,
37                                          int elementType,
38                                          CClientClientDHTInt::Index2VectorInfoTypeMap& globalScalarIndexOnProc);
39
40protected:
41  //! Global index of an scalar on grid destination
42  std::vector<int> scalarDestGlobalIndex_;
43
44  //! Size of
45  int scalarDestGlobalSize_;
46
47    //! Scalar on grid destination
48  CScalar* scalarDest_;
49
50  //! Scalar on grid source
51  CScalar* scalarSrc_;
52  //! Axis source
53  CAxis* axisSrc_;
54  //! Domain source
55  CDomain* domainSrc_;
56};
57
58}
59#endif // __XIOS_SCALAR_ALGORITHM_TRANSFORMATION_HPP__
Note: See TracBrowser for help on using the repository browser.