source: XIOS/dev/dev_trunk_omp/src/interface/c/icgenerate_rectilinear_domain.cpp @ 1646

Last change on this file since 1646 was 1646, checked in by yushan, 5 years ago

branch merged with trunk @1645. arch file (ep&mpi) added for ADA

File size: 1.6 KB
RevLine 
[784]1/* ************************************************************************** *
2 *      Copyright © IPSL/LSCE, xios, Avril 2010 - Octobre 2011         *
3 * ************************************************************************** */
4
5#include <boost/multi_array.hpp>
6
[1542]7#include <memory>
8
[784]9#include "xios.hpp"
10
11#include "object_template.hpp"
12#include "group_template.hpp"
13#include "attribute_template.hpp"
14
15#include "icutil.hpp"
16#include "timer.hpp"
[786]17#include "generate_rectilinear_domain.hpp"
[784]18
19extern "C"
20{
21// /////////////////////////////// Définitions ////////////////////////////// //
22
23   // ----------------------- Redéfinition de types ----------------------------
24
[786]25   typedef xios::CGenerateRectilinearDomain   * XGenDomainPtr;
[784]26
27   // ------------------------ Création des handle -----------------------------
[786]28   void cxios_generate_rectilinear_domain_handle_create(XGenDomainPtr * _ret, const char * _id, int _id_len)
[1646]29   TRY
[784]30   {
31      std::string id;
32      if (!cstr2string(_id, _id_len, id)) return;
33      CTimer::get("XIOS").resume() ;
[786]34      *_ret = xios::CGenerateRectilinearDomain::get(id);
[784]35      CTimer::get("XIOS").suspend() ;
36   }
[1646]37   CATCH_DUMP_STACK
[784]38
39   // -------------------- Vérification des identifiants -----------------------
[786]40   void cxios_generate_rectilinear_domain_valid_id(bool * _ret, const char * _id, int _id_len)
[1646]41   TRY
[784]42   {
43      std::string id;
44      if (!cstr2string(_id, _id_len, id)) return;
45
46      CTimer::get("XIOS").resume() ;
[786]47      *_ret = xios::CGenerateRectilinearDomain::has(id);
[784]48      CTimer::get("XIOS").suspend() ;
49   }
[1646]50   CATCH_DUMP_STACK
[784]51} // extern "C"
Note: See TracBrowser for help on using the repository browser.