Ignore:
Timestamp:
06/06/17 19:06:45 (7 years ago)
Author:
yushan
Message:

fix bad commit. Back to R1155 branch not merged

Location:
XIOS/dev/branch_yushan_merged/src/transformation
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/average_reduction.cpp

    r1157 r1160  
    3939    int nbLocalIndex = localIndex.size(); 
    4040    int currentlocalIndex = 0; 
    41     double currentWeight  = 0.0;     
     41    double currentWeight  = 0.0; 
    4242 
     43    dataOut=std::numeric_limits<double>::quiet_NaN(); 
    4344 
    4445    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5859          weights_(currentlocalIndex) += 1.0; 
    5960        } 
    60       } 
    61       else 
    62       { 
    63         if (flagInitial[currentlocalIndex])  
    64           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    6561      } 
    6662    } 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/max_reduction.cpp

    r1157 r1160  
    3737    int nbLocalIndex = localIndex.size(); 
    3838    int currentlocalIndex = 0; 
    39  
     39    dataOut=std::numeric_limits<double>::quiet_NaN();     
    4040    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4141    { 
     
    5252          dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex)); 
    5353        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5954      } 
    6055    } 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/min_reduction.cpp

    r1157 r1160  
    3737    int nbLocalIndex = localIndex.size(); 
    3838    int currentlocalIndex = 0; 
    39  
     39    dataOut=std::numeric_limits<double>::quiet_NaN(); 
    4040    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4141    { 
     
    5252          dataOut(currentlocalIndex) = std::min(*(dataInput + idx), dataOut(currentlocalIndex)); 
    5353        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5954      } 
    6055    } 
  • XIOS/dev/branch_yushan_merged/src/transformation/Functions/sum_reduction.cpp

    r1157 r1160  
    3737    int nbLocalIndex = localIndex.size(); 
    3838    int currentlocalIndex = 0; 
     39 
     40    dataOut=std::numeric_limits<double>::quiet_NaN(); 
    3941   
    4042    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5254          dataOut(currentlocalIndex) += *(dataInput + idx); 
    5355        } 
    54       } 
    55       else 
    56       { 
    57         if (flagInitial[currentlocalIndex])  
    58           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5956      } 
    6057    }     
  • XIOS/dev/branch_yushan_merged/src/transformation/generic_algorithm_transformation.cpp

    r1156 r1160  
    4545      { 
    4646        dataOut(localIndex[idx].first) += *(dataInput + idx) * localIndex[idx].second; 
    47         flagInitial[localIndex[idx].first] = true; // Reset flag to indicate not all data source are nan 
    48       } 
    49     } 
    50  
    51     // If all data source are nan then data destination must be nan 
    52     for (int idx = 0; idx < nbLocalIndex; ++idx) 
    53     { 
    54       if (!flagInitial[localIndex[idx].first]) 
    55         dataOut(localIndex[idx].first) = defaultValue; 
    56     } 
     47      } 
     48    } 
     49 
     50    // for (int idx = 0; idx < nbLocalIndex; ++idx) 
     51    // { 
     52    //   if (!flagInitial[localIndex[idx].first]) 
     53    //     dataOut(localIndex[idx].first) = defaultValue; 
     54    // } 
    5755  } 
    5856  else 
Note: See TracChangeset for help on using the changeset viewer.