source: XIOS/trunk/src/node/interpolate_domain.hpp @ 1119

Last change on this file since 1119 was 1004, checked in by mhnguyen, 8 years ago

Some modifications of reading/writing interpolation weight from/into a file
There are 3 attributes concerning read/write weights from/into a file

  • write_weight: true/false. Default value: false
  • weight_filename.
  • mode: Default value: compute + read: read from file whose name is weight_filename + compute: compute weights + read_or_compute: if weight_filename already exists, the weights will be read from it; otherwise the weights will be computed

In mode compute and read_or_compute, if there is no weight_filename, a filename whose format
xios_interpolation_weight_nameOfContext_nameOfDomainSource_nameOfDomainDestination.nc will be used for read/write.

Test
+) On Curie
+) Work

File size: 2.0 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;
22
23  ///--------------------------------------------------------------
24
25  // Declare/Define CFileAttribute
[689]26  BEGIN_DECLARE_ATTRIBUTE_MAP(CInterpolateDomain)
27#include "interpolate_domain_attribute.conf"
28  END_DECLARE_ATTRIBUTE_MAP(CInterpolateDomain)
[657]29
30  ///--------------------------------------------------------------
31  /*!
[689]32    \class CInterpolateDomain
[657]33    This class describes interpolate_from_file_domain in xml file.
34  */
[689]35  class CInterpolateDomain
36    : public CObjectTemplate<CInterpolateDomain>
37    , public CInterpolateDomainAttributes
[657]38    , public CTransformation<CDomain>
39  {
40    public :
[689]41      typedef CObjectTemplate<CInterpolateDomain> SuperClass;
42      typedef CInterpolateDomainAttributes SuperClassAttribute;
[657]43
44    public :
45      /// Constructeurs ///
[689]46      CInterpolateDomain(void);
47      explicit CInterpolateDomain(const StdString& id);
[657]48
49      /// Destructeur ///
[689]50      virtual ~CInterpolateDomain(void);
[657]51
[1004]52      virtual void checkValid(CDomain* domainSource);
[657]53
54      /// Accesseurs statiques ///
55      static StdString GetName(void);
56      static StdString GetDefName(void);
57      static ENodeType GetType(void);
58    private:
[836]59      static bool registerTrans();
60      static CTransformation<CDomain>* create(const StdString& id, xml::CXMLNode* node);
61      static bool _dummyRegistered;
[689]62  }; // class CInterpolateDomain
[657]63
[689]64  DECLARE_GROUP(CInterpolateDomain);
[657]65} // namespace xios
66
[689]67#endif // __XIOS_CInterpolateDomain__
Note: See TracBrowser for help on using the repository browser.