source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/algorithm_transformation_transfer.hpp @ 1998

Last change on this file since 1998 was 1997, checked in by ymipsl, 4 years ago

New transformation algorithm created that can be inherited more specifically for a given transformation :

  • no_data_modification : only the element is modifed, the data are not modofied
  • transfer : data is juste transfered from source element to destination element
  • weight : destination data is composed of sum of source data associated to a weight

YM

  • Property svn:executable set to *
File size: 1.0 KB
Line 
1#ifndef __XIOS_ALGORITHM_TRANSFORMATION_TRANSFER_HPP__
2#define __XIOS_ALGORITHM_TRANSFORMATION_TRANSFER_HPP__
3
4#include "generic_algorithm_transformation.hpp"
5#include "transfer_transform_connector.hpp"
6#include "array_new.hpp"
7
8namespace xios
9{
10
11  class CAlgorithmTransformationTransfer : public CGenericAlgorithmTransformation
12  {
13    public:
14
15      CAlgorithmTransformationTransfer(bool isSource) : CGenericAlgorithmTransformation(isSource) {}
16      virtual ~CAlgorithmTransformationTransfer() {};
17      virtual void apply(int dimBefore, int dimAfter, const CArray<double,1>& dataIn, CArray<double,1>& dataOut);
18   
19    protected:
20      virtual void computeAlgorithm(CLocalView* srcView, CLocalView* dstView) ;
21
22      //! Map between global index of destination element and source element
23      unordered_map<int,int> transformationMapping_;
24   
25      CTransformConnector* transformConnector_ ;
26      CTransferTransformConnector* transferTransformConnector_ ;
27  };
28
29}
30#endif //__XIOS_ALGORITHM_TRANSFORMATION_TRANSFER_HPP__
Note: See TracBrowser for help on using the repository browser.