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

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