source: XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/generic_algorithm_transformation.cpp @ 2291

Last change on this file since 2291 was 2291, checked in by ymipsl, 2 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

File size: 1.4 KB
Line 
1/*!
2   \file generic_algorithm_transformation.hpp
3   \author Ha NGUYEN
4   \since 14 May 2015
5   \date 21 Mars 2016
6
7   \brief Interface for all transformation algorithms.
8 */
9#include "generic_algorithm_transformation.hpp"
10#include "context.hpp"
11#include "context_client.hpp"
12#include "client_client_dht_template.hpp"
13#include "utils.hpp"
14#include "timer.hpp"
15#include "mpi.hpp"
16#include "transform_connector.hpp"
17#include "weight_transform_connector.hpp"
18#include "grid_algorithm_generic.hpp"
19#include "transform_filter.hpp"
20
21namespace xios
22{
23
24CGenericAlgorithmTransformation::CGenericAlgorithmTransformation(bool isSource)
25 : isSource_(isSource)
26{
27}
28
29
30
31///////////////////////////////////////////////////////////////
32////////// new algorithm for new method               /////////
33///////////////////////////////////////////////////////////////
34
35shared_ptr<CGridAlgorithm> CGenericAlgorithmTransformation::createGridAlgorithm(CGrid* gridSrc, CGrid* gridDst, int pos)
36{
37  auto algo = make_shared<CGridAlgorithmGeneric>(gridSrc, gridDst, pos, shared_from_this()) ;
38  algo->computeAlgorithm() ;
39  return algo ; 
40}
41
42
43
44CTransformFilter* CGenericAlgorithmTransformation::createTransformFilter(CGarbageCollector& gc, shared_ptr<CGridAlgorithm> algo, bool detectMissingValues, double defaultValue)
45{
46  return new CTransformFilter(gc, 1, algo, detectMissingValues, defaultValue) ;
47}
48
49vector<string> CGenericAlgorithmTransformation::getAuxFieldId(void) 
50{
51  return vector<string>() ;
52}
53
54}
Note: See TracBrowser for help on using the repository browser.