Ignore:
Timestamp:
09/19/13 17:05:07 (11 years ago)
Author:
ymipsl
Message:

Add unstructured grid management.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/interface/c_attr/icdomain_attr.cpp

    r445 r449  
    1717  typedef xios::CDomain*  domain_Ptr; 
    1818   
     19  void cxios_set_domain_bounds_lat(domain_Ptr domain_hdl, double* bounds_lat, int extent1, int extent2) 
     20  { 
     21    CTimer::get("XIOS").resume(); 
     22    CArray<double,2> tmp(bounds_lat,shape(extent1,extent2),neverDeleteData) ; 
     23    domain_hdl->bounds_lat.reference(tmp.copy()); 
     24    domain_hdl->sendAttributToServer(domain_hdl->bounds_lat); 
     25     CTimer::get("XIOS").suspend(); 
     26  } 
     27   
     28  void cxios_get_domain_bounds_lat(domain_Ptr domain_hdl, double* bounds_lat, int extent1, int extent2) 
     29  { 
     30    CTimer::get("XIOS").resume(); 
     31    CArray<double,2> tmp(bounds_lat,shape(extent1,extent2),neverDeleteData) ; 
     32    tmp=domain_hdl->bounds_lat.getInheritedValue() ; 
     33     CTimer::get("XIOS").suspend(); 
     34  } 
     35   
     36  bool cxios_is_defined_domain_bounds_lat(domain_Ptr domain_hdl ) 
     37  { 
     38     CTimer::get("XIOS").resume(); 
     39    return domain_hdl->bounds_lat.hasInheritedValue(); 
     40     CTimer::get("XIOS").suspend(); 
     41  } 
     42   
     43   
     44   
     45  void cxios_set_domain_bounds_lon(domain_Ptr domain_hdl, double* bounds_lon, int extent1, int extent2) 
     46  { 
     47    CTimer::get("XIOS").resume(); 
     48    CArray<double,2> tmp(bounds_lon,shape(extent1,extent2),neverDeleteData) ; 
     49    domain_hdl->bounds_lon.reference(tmp.copy()); 
     50    domain_hdl->sendAttributToServer(domain_hdl->bounds_lon); 
     51     CTimer::get("XIOS").suspend(); 
     52  } 
     53   
     54  void cxios_get_domain_bounds_lon(domain_Ptr domain_hdl, double* bounds_lon, int extent1, int extent2) 
     55  { 
     56    CTimer::get("XIOS").resume(); 
     57    CArray<double,2> tmp(bounds_lon,shape(extent1,extent2),neverDeleteData) ; 
     58    tmp=domain_hdl->bounds_lon.getInheritedValue() ; 
     59     CTimer::get("XIOS").suspend(); 
     60  } 
     61   
     62  bool cxios_is_defined_domain_bounds_lon(domain_Ptr domain_hdl ) 
     63  { 
     64     CTimer::get("XIOS").resume(); 
     65    return domain_hdl->bounds_lon.hasInheritedValue(); 
     66     CTimer::get("XIOS").suspend(); 
     67  } 
     68   
     69   
     70   
    1971  void cxios_set_domain_data_dim(domain_Ptr domain_hdl, int data_dim) 
    2072  { 
     
    536588   
    537589   
     590  void cxios_set_domain_nvertex(domain_Ptr domain_hdl, int nvertex) 
     591  { 
     592     CTimer::get("XIOS").resume(); 
     593    domain_hdl->nvertex.setValue(nvertex); 
     594    domain_hdl->sendAttributToServer(domain_hdl->nvertex); 
     595     CTimer::get("XIOS").suspend(); 
     596  } 
     597   
     598  void cxios_get_domain_nvertex(domain_Ptr domain_hdl, int* nvertex) 
     599  { 
     600    *nvertex = domain_hdl->nvertex.getInheritedValue(); 
     601  } 
     602   
     603  bool cxios_is_defined_domain_nvertex(domain_Ptr domain_hdl ) 
     604  { 
     605     CTimer::get("XIOS").resume(); 
     606    return domain_hdl->nvertex.hasInheritedValue(); 
     607     CTimer::get("XIOS").suspend(); 
     608  } 
     609   
     610   
     611   
    538612  void cxios_set_domain_standard_name(domain_Ptr domain_hdl, const char * standard_name, int standard_name_size) 
    539613  { 
     
    563637   
    564638   
     639  void cxios_set_domain_type(domain_Ptr domain_hdl, const char * type, int type_size) 
     640  { 
     641    std::string type_str; 
     642    if(!cstr2string(type, type_size, type_str)) return; 
     643     CTimer::get("XIOS").resume(); 
     644    domain_hdl->type.fromString(type_str); 
     645    domain_hdl->sendAttributToServer(domain_hdl->type); 
     646     CTimer::get("XIOS").suspend(); 
     647  } 
     648   
     649  void cxios_get_domain_type(domain_Ptr domain_hdl, char * type, int type_size) 
     650  { 
     651     CTimer::get("XIOS").resume(); 
     652    if(!string_copy(domain_hdl->type.getInheritedStringValue(),type , type_size)) 
     653      ERROR("void cxios_get_domain_type(domain_Ptr domain_hdl, char * type, int type_size)", <<"Input string is to short"); 
     654     CTimer::get("XIOS").suspend(); 
     655  } 
     656   
     657  bool cxios_is_defined_domain_type(domain_Ptr domain_hdl ) 
     658  { 
     659     CTimer::get("XIOS").resume(); 
     660    return domain_hdl->type.hasInheritedValue(); 
     661     CTimer::get("XIOS").suspend(); 
     662  } 
     663   
     664   
     665   
    565666  void cxios_set_domain_zoom_ibegin(domain_Ptr domain_hdl, int zoom_ibegin) 
    566667  { 
Note: See TracChangeset for help on using the changeset viewer.