source: XIOS/trunk/src/transformation/axis_algorithm_extract.hpp

Last change on this file was 1982, checked in by yushan, 6 days ago

trunk : workflow graph big fixed for chained spatial filters. Filter name simplified for graph

File size: 2.0 KB
RevLine 
[1558]1/*!
2   \file axis_algorithm_extract.hpp
3   \brief Algorithm for extracting an axis.
4 */
5#ifndef __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
6#define __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
7
8#include "axis_algorithm_transformation.hpp"
9#include "transformation.hpp"
10
11namespace xios {
12class CAxis;
13class CExtractAxis;
14
15/*!
16  \class CAxisAlgorithmExtract
17  Implementing extract on axis
18  A extracted region can be considered as region that isn't masked.
19  Only this extracted region is extracted to write on Netcdf.
20*/
21class CAxisAlgorithmExtract : public CAxisAlgorithmTransformation
22{
23public:
24  CAxisAlgorithmExtract(CAxis* axisDestination, CAxis* axisSource, CExtractAxis* extractAxis);
25
26  virtual ~CAxisAlgorithmExtract() {}
27
28  static bool registerTrans();
[1704]29
[1982]30  virtual StdString getName() {return "extract_axis";}
31 
[1558]32protected:
33  void computeIndexSourceMapping_(const std::vector<CArray<double,1>* >& dataAuxInputs);
34
35private:
36
37private:
38  //! Global extract begin on axis
39  StdSize extractBegin_;
40
41  //! Global extract end on axis
42  StdSize extractEnd_;
43
44  //! Global extract size on axis
45  StdSize extractN_;
46
47  std::vector<int> extractIndex_;
48
49private:
50
51  static CGenericAlgorithmTransformation* create(CGrid* gridDst, CGrid* gridSrc,
52                                                CTransformation<CAxis>* transformation,
53                                                int elementPositionInGrid,
54                                                std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
55                                                std::map<int, int>& elementPositionInGridSrc2AxisPosition,
56                                                std::map<int, int>& elementPositionInGridSrc2DomainPosition,
57                                                std::map<int, int>& elementPositionInGridDst2ScalarPosition,
58                                                std::map<int, int>& elementPositionInGridDst2AxisPosition,
59                                                std::map<int, int>& elementPositionInGridDst2DomainPosition);
60};
61
62}
63#endif // __XIOS_AXIS_ALGORITHM_EXTRACT_HPP__
Note: See TracBrowser for help on using the repository browser.