Changeset 678 for XIOS/branchs


Ignore:
Timestamp:
08/31/15 16:19:20 (9 years ago)
Author:
rlacroix
Message:

Relax some checks on domain attributes to allow empty local domains.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/branchs/xios-1.0/src/node/domain.cpp

    r611 r678  
    172172 
    173173 
    174       if (ni.getValue() < 0 || ibegin.getValue() > iend.getValue() || 
     174      if (ni.getValue() < 0 || (ni.getValue() > 0 && ibegin.getValue() > iend.getValue()) || 
    175175          ibegin.getValue() < 1 || iend.getValue() > ni_glo.getValue()) 
    176176          { 
     
    210210      } 
    211211 
    212       if (nj.getValue() < 0 || jbegin.getValue() > jend.getValue() || 
     212      if (nj.getValue() < 0 || (nj.getValue() > 0 && jbegin.getValue() > jend.getValue()) || 
    213213          jbegin.getValue() < 1 || jend.getValue() > nj_glo.getValue()) 
    214214         ERROR("CDomain::checkAttributes(void)", 
     
    302302      if (data_ibegin.isEmpty()) 
    303303         data_ibegin.setValue(0) ; 
    304       if (data_jbegin.isEmpty() && (data_dim.getValue() == 2)) 
     304      if (data_jbegin.isEmpty() && data_dim.getValue() == 2) 
    305305         data_jbegin.setValue(0) ; 
    306306 
    307       if (!data_ni.isEmpty() && (data_ni.getValue() <= 0)) 
     307      if (!data_ni.isEmpty() && data_ni.getValue() < 0) 
    308308      { 
    309309         ERROR("CDomain::checkAttributes(void)", 
     
    319319      if (data_dim.getValue() == 2) 
    320320      { 
    321          if (!data_nj.isEmpty() && (data_nj.getValue() <= 0) ) 
     321         if (!data_nj.isEmpty() && data_nj.getValue() < 0) 
    322322         { 
    323323            ERROR("CDomain::checkAttributes(void)", 
     
    364364      { 
    365365         if (!data_n_index.isEmpty() || 
    366             ((data_dim.getValue() == 2) && (!data_j_index.isEmpty()))) 
     366             (data_dim.getValue() == 2 && !data_j_index.isEmpty())) 
    367367            ERROR("CDomain::checkAttributes(void)", << "data_i_index undefined") ; 
    368368      } 
Note: See TracChangeset for help on using the changeset viewer.