source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/scalar_algorithm/scalar_algorithm_extract_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.9 KB
Line 
1/*!
2   \file scalar_algorithm_extract_scalar.hpp
3   \author Ha NGUYEN
4   \since 23 June 2016
5   \date 23 June 2016
6
7   \brief Algorithm for extract an axis to a scalar
8 */
9#ifndef __XIOS_SCALAR_ALGORITHM_EXTRACT_AXIS_HPP__
10#define __XIOS_SCALAR_ALGORITHM_EXTRACT_AXIS_HPP__
11
12#include "algorithm_transformation_transfer.hpp"
13#include "transformation.hpp"
14
15namespace xios {
16
17class CScalar;
18class CAxis;
19class CExtractAxisToScalar;
20class CReductionAlgorithm;
21
22/*!
23  \class CScalarAlgorithmExtractAxis
24  Extract a scalar from an axis
25*/
26class CScalarAlgorithmExtractAxis : public CAlgorithmTransformationTransfer
27{
28public:
29  CScalarAlgorithmExtractAxis(bool isSource, CScalar* scalarDestination, CAxis* axisSource, CExtractAxisToScalar* algo);
30
31 
32  virtual ~CScalarAlgorithmExtractAxis() {} ;
33
34  static bool registerTrans();
35  virtual StdString getAlgoName() {return "\\nextract_axis";}
36
37protected:
38  int pos_;
39
40public:
41  static shared_ptr<CGenericAlgorithmTransformation> create(bool isSource, CGrid* gridDst, CGrid* gridSrc,
42                                                CTransformation<CScalar>* transformation,
43                                                int elementPositionInGrid,
44                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
45                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
46                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
47                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
48                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
49                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
50  static bool dummyRegistered_;
51};
52
53}
54#endif // __XIOS_SCALAR_ALGORITHM_EXTRACT_AXIS_HPP__
Note: See TracBrowser for help on using the repository browser.