source: XIOS/dev/dev_ym/XIOS_COUPLING/src/node/interpolate_domain.hpp @ 2284

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

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

YM

File size: 3.5 KB
RevLine 
[689]1#ifndef __XIOS_CInterpolateDomain__
2#define __XIOS_CInterpolateDomain__
[657]3
4/// xios headers ///
5#include "xios_spl.hpp"
6#include "attribute_enum.hpp"
7#include "attribute_enum_impl.hpp"
8#include "attribute_array.hpp"
9#include "declare_attribute.hpp"
10#include "object_template.hpp"
11#include "group_factory.hpp"
12#include "declare_group.hpp"
13#include "transformation.hpp"
14#include "domain.hpp"
15
16namespace xios {
17  /// ////////////////////// Déclarations ////////////////////// ///
[689]18  class CInterpolateDomainGroup;
19  class CInterpolateDomainAttributes;
20  class CInterpolateDomain;
[657]21  class CDomain;
[2011]22  class CGenericAlgorithmTransformation ;
23  class CGrid;
[657]24  ///--------------------------------------------------------------
25
26  // Declare/Define CFileAttribute
[689]27  BEGIN_DECLARE_ATTRIBUTE_MAP(CInterpolateDomain)
28#include "interpolate_domain_attribute.conf"
29  END_DECLARE_ATTRIBUTE_MAP(CInterpolateDomain)
[657]30
31  ///--------------------------------------------------------------
32  /*!
[689]33    \class CInterpolateDomain
[657]34    This class describes interpolate_from_file_domain in xml file.
35  */
[689]36  class CInterpolateDomain
37    : public CObjectTemplate<CInterpolateDomain>
38    , public CInterpolateDomainAttributes
[657]39    , public CTransformation<CDomain>
40  {
41    public :
[689]42      typedef CObjectTemplate<CInterpolateDomain> SuperClass;
43      typedef CInterpolateDomainAttributes SuperClassAttribute;
[1984]44      typedef CInterpolateDomain MyClass ;
45      typedef CTransformation<CDomain> SuperTransform ;
[657]46
47    public :
48      /// Constructeurs ///
[689]49      CInterpolateDomain(void);
50      explicit CInterpolateDomain(const StdString& id);
[657]51
52      /// Destructeur ///
[689]53      virtual ~CInterpolateDomain(void);
[657]54
[1021]55      virtual void checkValid(CDomain* domainSource);
[657]56
57      /// Accesseurs statiques ///
58      static StdString GetName(void);
59      static StdString GetDefName(void);
60      static ENodeType GetType(void);
[1984]61      const string& getId(void) { return this->SuperClass::getId();}
62      ETranformationType getTransformationType(void) { return TRANS_INTERPOLATE_DOMAIN ;}
63      static CTransformation<CDomain>* getTransformation(const StdString& id) { return SuperClass::get(id);}
64      virtual void inheritFrom(SuperTransform* srcTransform) { solveDescInheritance(true, this->SuperClass::get((MyClass*)srcTransform)) ;}
[2270]65      virtual shared_ptr<CGenericAlgorithmTransformation> createAlgorithm(bool isSource,
[2011]66                                                               CGrid* gridDst, CGrid* gridSrc,
67                                                               int elementPositionInGrid,
68                                                               std::map<int, int>& elementPositionInGridSrc2ScalarPosition,
69                                                               std::map<int, int>& elementPositionInGridSrc2AxisPosition,
70                                                               std::map<int, int>& elementPositionInGridSrc2DomainPosition,
71                                                               std::map<int, int>& elementPositionInGridDst2ScalarPosition,
72                                                               std::map<int, int>& elementPositionInGridDst2AxisPosition,
73                                                               std::map<int, int>& elementPositionInGridDst2DomainPosition)  ;
[657]74    private:
[836]75      static bool registerTrans();
76      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
77      static bool _dummyRegistered;
[689]78  }; // class CInterpolateDomain
[657]79
[689]80  DECLARE_GROUP(CInterpolateDomain);
[657]81} // namespace xios
82
[689]83#endif // __XIOS_CInterpolateDomain__
Note: See TracBrowser for help on using the repository browser.