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

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

Tracking memory leak :
Tranformations and algorithms are now managed with shared_ptr.

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{
[2270]37  return make_shared<CGridAlgorithmGeneric>(gridSrc, gridDst, pos, shared_from_this()) ;
[1999]38}
[1984]39
40
[2007]41
[2270]42CTransformFilter* CGenericAlgorithmTransformation::createTransformFilter(CGarbageCollector& gc, shared_ptr<CGridAlgorithm> algo, bool detectMissingValues, double defaultValue)
[1984]43{
[2011]44  return new CTransformFilter(gc, 1, algo, detectMissingValues, defaultValue) ;
[1999]45}
[1984]46
[2011]47vector<string> CGenericAlgorithmTransformation::getAuxFieldId(void) 
[1984]48{
[2011]49  return vector<string>() ;
[1984]50}
[2011]51
[1984]52}
Note: See TracBrowser for help on using the repository browser.