source: XIOS/trunk/src/transformation/scalar_algorithm_transformation.hpp @ 1704

Last change on this file since 1704 was 1704, checked in by yushan, 14 months ago

Introducing the new graph functionality. Attribute build_workflow_graph=.TRUE. is used in the field definition section in the xml file to enable the workflow graph of the field and other fields referecing to it. A more detailed document will be available soon on the graph fuctionality.

File size: 1.7 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(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 Trans. Filter \\n Transformation";}
34
35protected:
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
42protected:
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__
Note: See TracBrowser for help on using the repository browser.