source: XIOS/dev/dev_olga/src/interface/c/icreduce_to_scalar.cpp @ 1314

Last change on this file since 1314 was 981, checked in by mhnguyen, 8 years ago

Fortran interfaces:

+) Adding Fortran interfaces of transformation

Test
+) Only complilation on Curie

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#include <boost/shared_ptr.hpp>
7
8#include "xios.hpp"
9
10#include "object_template.hpp"
11#include "group_template.hpp"
12#include "attribute_template.hpp"
13
14#include "icutil.hpp"
15#include "timer.hpp"
16#include "reduce_axis_to_scalar.hpp"
17#include "reduce_domain_to_scalar.hpp"
18
19extern "C"
20{
21// /////////////////////////////// Définitions ////////////////////////////// //
22
23   // ----------------------- Redéfinition de types ----------------------------
24
25   typedef xios::CReduceAxisToScalar      * XReduceAxisToScalarPtr;
26   typedef xios::CReduceDomainToScalar    * XReduceDomainToScalarPtr;
27
28   // ------------------------ Création des handle -----------------------------
29   void cxios_reduce_axis_to_scalar_handle_create(XReduceAxisToScalarPtr * _ret, const char * _id, int _id_len)
30   {
31      std::string id;
32      if (!cstr2string(_id, _id_len, id)) return;
33      CTimer::get("XIOS").resume() ;
34      *_ret = xios::CReduceAxisToScalar::get(id);
35      CTimer::get("XIOS").suspend() ;
36   }
37
38   // -------------------- Vérification des identifiants -----------------------
39   void cxios_reduce_axis_to_scalar_valid_id(bool * _ret, const char * _id, int _id_len)
40   {
41      std::string id;
42      if (!cstr2string(_id, _id_len, id)) return;
43
44      CTimer::get("XIOS").resume() ;
45      *_ret = xios::CReduceAxisToScalar::has(id);
46      CTimer::get("XIOS").suspend() ;
47   }
48
49   void cxios_reduce_domain_to_scalar_handle_create(XReduceDomainToScalarPtr * _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::CReduceDomainToScalar::get(id);
55      CTimer::get("XIOS").suspend() ;
56   }
57
58   // -------------------- Vérification des identifiants -----------------------
59   void cxios_reduce_domain_to_scalar_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::CReduceDomainToScalar::has(id);
66      CTimer::get("XIOS").suspend() ;
67   }
68
69} // extern "C"
Note: See TracBrowser for help on using the repository browser.