Ignore:
Timestamp:
06/23/17 15:01:41 (7 years ago)
Author:
rlacroix
Message:

Add a new field attribut "check_if_active".

If this attribut is set to "true", xios_send_field will check if the field is active at current timestep and will be a no-op if it is not.

File:
1 edited

Legend:

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

    r1005 r1181  
    119119 
    120120 
     121  void cxios_set_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool check_if_active) 
     122  { 
     123    CTimer::get("XIOS").resume(); 
     124    fieldgroup_hdl->check_if_active.setValue(check_if_active); 
     125    CTimer::get("XIOS").suspend(); 
     126  } 
     127 
     128  void cxios_get_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl, bool* check_if_active) 
     129  { 
     130    CTimer::get("XIOS").resume(); 
     131    *check_if_active = fieldgroup_hdl->check_if_active.getInheritedValue(); 
     132    CTimer::get("XIOS").suspend(); 
     133  } 
     134 
     135  bool cxios_is_defined_fieldgroup_check_if_active(fieldgroup_Ptr fieldgroup_hdl) 
     136  { 
     137     CTimer::get("XIOS").resume(); 
     138     bool isDefined = fieldgroup_hdl->check_if_active.hasInheritedValue(); 
     139     CTimer::get("XIOS").suspend(); 
     140     return isDefined; 
     141  } 
     142 
     143 
    121144  void cxios_set_fieldgroup_compression_level(fieldgroup_Ptr fieldgroup_hdl, int compression_level) 
    122145  { 
Note: See TracChangeset for help on using the changeset viewer.