source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_reduce_axis.hpp @ 2270

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

Tracking memory leak :
Tranformations and algorithms are now managed with shared_ptr.

YM

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1/*!
2   \file scalar_algorithm_reduce_scalar.hpp
3   \author Ha NGUYEN
4   \since 23 June 2016
5   \date 23 June 2016
6
7   \brief Algorithm for reduce an axis to a scalar
8 */
9#ifndef __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__
10#define __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__
11
12#include "algorithm_transformation_reduce.hpp"
13#include "transformation.hpp"
14
15namespace xios {
16
17class CScalar;
18class CAxis;
19class CReduceAxisToScalar;
20class CReductionAlgorithm;
21
22/*!
23  \class CScalarAlgorithmReduceAxis
24  Reducing an axis to a scalar
25*/
26class CScalarAlgorithmReduceAxis : public CAlgorithmTransformationReduce
27{
28public:
29  CScalarAlgorithmReduceAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CReduceAxisToScalar* algo);
30
31 
32  virtual ~CScalarAlgorithmReduceAxis();
33
34  static bool registerTrans();
35
36  virtual StdString getAlgoName() {return "\\nreduce_axis";}
37
38public:
39  static shared_ptr<CGenericAlgorithmTransformation> create(bool isSource, CGrid* gridDst, CGrid* gridSrc,
40                                                CTransformation<CScalar>* transformation,
41                                                int elementPositionInGrid,
42                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
43                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
44                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
45                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
46                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
47                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
48  static bool dummyRegistered_;
49};
50
51}
52#endif // __XIOS_SCALAR_ALGORITHM_REDUCE_AXIS_HPP__
Note: See TracBrowser for help on using the repository browser.