source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/grid_algorithm_generic.hpp @ 2267

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

tracking memory leak
Elements, views, and connectors are now managed with shared pointer.
YM

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1#ifndef __XIOS_GRID_ALGORITHM_GENERIC_HPP__
2#define __XIOS_GRID_ALGORITHM_GENERIC_HPP__
3
4#include "grid_transform_connector.hpp"
5#include <map>
6#include "array_new.hpp"
7#include "local_view.hpp"
8#include "grid_algorithm.hpp"
9
10namespace xios
11{
12  class CGrid;
13  class CGenericAlgorithmTransformation ;
14
15  /*!
16  \class CGenericAlgorithmTransformation
17  This class defines the interface for all other inherited algorithms class
18  */
19class CTransformFilter ;
20class CGarbageCollector ;
21
22class CGridAlgorithmGeneric : public CGridAlgorithm
23{
24  public:
25    CGridAlgorithmGeneric(CGrid* gridSrc, CGrid* gridDst, int pos,  CGenericAlgorithmTransformation* algo) ;
26    virtual ~CGridAlgorithmGeneric() {} ;
27
28    void computeAlgorithm(void) ;
29    virtual void apply(const CArray<double,1>& dataIn, CArray<double,1>& dataOut) ;
30    virtual void apply(const CArray<double,1>& dataIn, const vector<CArray<double,1>>& auxData, CArray<double,1>& dataOut) ;
31   
32  protected:
33    shared_ptr<CGridTransformConnector> gridTransformConnector_=nullptr ;
34    CGrid* gridSrc_ = nullptr ;
35    CGrid* gridDst_ = nullptr ;
36    int pos_ ;
37    int dimBefore_=1 ;
38    int dimAfter_=1 ;
39
40};
41
42}
43#endif // __XIOS_GRID_ALGORITHM_GENERIC_HPP__
Note: See TracBrowser for help on using the repository browser.