source: XIOS/trunk/src/interface/c/icinterpolate.cpp @ 1542

Last change on this file since 1542 was 1542, checked in by oabramkina, 6 years ago

Replacing Boost's unordered_map and shared_pointer by its STL counterparts.

Two notes for Curie:

  • one can see the content of unordered_map with ddt only if XIOS has been compiled with gnu
  • XIOS will not compile any more with pgi (all available versions use old STL which are not up to the c++11 norms)
File size: 2.3 KB
Line 
1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6
7#include "xios.hpp"
8
9#include "object_template.hpp"
10#include "group_template.hpp"
11#include "attribute_template.hpp"
12
13#include "icutil.hpp"
14#include "timer.hpp"
15#include "interpolate_domain.hpp"
16#include "interpolate_axis.hpp"
17
18extern "C"
19{
20// /////////////////////////////// Définitions ////////////////////////////// //
21
22   // ----------------------- Redéfinition de types ----------------------------
23
24   typedef xios::CInterpolateDomain    * XInterpolateDomainPtr;
25   typedef xios::CInterpolateAxis      * XInterpolateAxisPtr;
26
27   // ------------------------ Création des handle -----------------------------
28   void cxios_interpolate_domain_handle_create(XInterpolateDomainPtr * _ret, const char * _id, int _id_len)
29   {
30      std::string id;
31      if (!cstr2string(_id, _id_len, id)) return;
32      CTimer::get("XIOS").resume() ;
33      *_ret = xios::CInterpolateDomain::get(id);
34      CTimer::get("XIOS").suspend() ;
35   }
36
37   // -------------------- Vérification des identifiants -----------------------
38   void cxios_interpolate_domain_valid_id(bool * _ret, const char * _id, int _id_len)
39   {
40      std::string id;
41      if (!cstr2string(_id, _id_len, id)) return;
42
43      CTimer::get("XIOS").resume() ;
44      *_ret = xios::CInterpolateDomain::has(id);
45      CTimer::get("XIOS").suspend() ;
46   }
47
48    // ------------------------ Création des handle -----------------------------
49   void cxios_interpolate_axis_handle_create(XInterpolateAxisPtr * _ret, const char * _id, int _id_len)
50   {
51      std::string id;
52      if (!cstr2string(_id, _id_len, id)) return;
53      CTimer::get("XIOS").resume() ;
54      *_ret = xios::CInterpolateAxis::get(id);
55      CTimer::get("XIOS").suspend() ;
56   }
57
58   // -------------------- Vérification des identifiants -----------------------
59   void cxios_interpolate_axis_valid_id(bool * _ret, const char * _id, int _id_len)
60   {
61      std::string id;
62      if (!cstr2string(_id, _id_len, id)) return;
63
64      CTimer::get("XIOS").resume() ;
65      *_ret = xios::CInterpolateAxis::has(id);
66      CTimer::get("XIOS").suspend() ;
67   }
68} // extern "C"
Note: See TracBrowser for help on using the repository browser.