source: XIOS/trunk/src/node/interpolate_domain.cpp @ 689

Last change on this file since 689 was 689, checked in by mhnguyen, 9 years ago

Modifying the interface of interpolation domain

+) Change node name from interpolate_from_file_domain to interpolate_domain and add some new atrributes
+) Add more tests into test_remap

Test
+) On Curie
+) test_remap works for direct weight calculation and reading weight calculation from file

File size: 1.3 KB
Line 
1#include "interpolate_domain.hpp"
2#include "type.hpp"
3
4namespace xios {
5
6  /// ////////////////////// Définitions ////////////////////// ///
7
8  CInterpolateDomain::CInterpolateDomain(void)
9    : CObjectTemplate<CInterpolateDomain>(), CInterpolateDomainAttributes(), CTransformation<CDomain>()
10  { /* Ne rien faire de plus */ }
11
12  CInterpolateDomain::CInterpolateDomain(const StdString & id)
13    : CObjectTemplate<CInterpolateDomain>(id), CInterpolateDomainAttributes(), CTransformation<CDomain>()
14  { /* Ne rien faire de plus */ }
15
16  CInterpolateDomain::~CInterpolateDomain(void)
17  {}
18
19  //----------------------------------------------------------------
20
21  StdString CInterpolateDomain::GetName(void)    { return StdString("interpolate_domain"); }
22  StdString CInterpolateDomain::GetDefName(void) { return StdString("interpolate_domain"); }
23  ENodeType CInterpolateDomain::GetType(void)    { return eInterpolateDomain; }
24
25  void CInterpolateDomain::checkValid(CDomain* domainSrc)
26  {
27    int order = 2;
28    if (!this->order.isEmpty()) order = this->order.getValue();
29    else this->order.setValue(order);
30    if (order < 1)
31    {
32       ERROR("void CInterpolateDomain::checkValid(CDomain* domainSrc)",
33             << "Interpolation order is less than 1, it should be greater than 0."
34             << "Please define a correct one") ;
35    }
36  }
37
38}
Note: See TracBrowser for help on using the repository browser.