Changeset 2188 for XIOS


Ignore:
Timestamp:
07/19/21 10:56:42 (3 years ago)
Author:
jderouillat
Message:

Fix average reduction (update reference results for test_scalar_algo)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/distribution/reduce_transform_connector.hpp

    r2000 r2188  
    315315                    else  
    316316                    { 
    317                       touched[pos+l]++ ; 
    318317                      out[l] = in[connector_[k]*sizeT+l] ; 
    319318                    } 
     319                    touched[pos+l]++ ; 
     320 
    320321                  } 
    321322                } 
     323              for(int l=0; l<sizeT; l++) { 
     324                  if (touched[pos+l]!=0) 
     325                      out[l] /= touched[pos+l]; 
     326              } 
     327 
    322328            } 
    323329          } 
     
    336342                for(int l=0; l<sizeT; l++)  
    337343                  if (touched[pos+l]==0) out[l] = defaultValue ; 
    338                   else out[l]/=touched[pos+l] ; 
    339344        } 
    340345 
Note: See TracChangeset for help on using the changeset viewer.