source: XIOS3/trunk/src/transformation/grid_algorithm_generic.hpp @ 2401

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

Improve reduction transformation

  • make the difference between reduction over geometry or reduction between process.
  • geometrical reduction :

domain -> axis
axis -> scalar
domain -> scalar

  • reduction across processes for redondant geometrical cell :

axis -> axis
scalar -> scalar

Reduction can be local (only for the geometrical cell owned by current process) or global, using the "local" attribute (bool) over the reduction.

YM

  • Property svn:executable set to *
File size: 1.3 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,  shared_ptr<CGenericAlgorithmTransformation> algo) ;
26    virtual ~CGridAlgorithmGeneric() {} ;
27
28    void computeAlgorithm(bool eliminateRedundant=true) ;
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
34    shared_ptr<CGridTransformConnector> gridTransformConnector_=nullptr ;
35    CGrid* gridSrc_ = nullptr ;
36    CGrid* gridDst_ = nullptr ;
37    int pos_ ;
38    int dimBefore_=1 ;
39    int dimAfter_=1 ;
40
41};
42
43}
44#endif // __XIOS_GRID_ALGORITHM_GENERIC_HPP__
Note: See TracBrowser for help on using the repository browser.