Changeset 1260
- Timestamp:
- 09/11/17 17:06:38 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/filter/spatial_transform_filter.cpp
r1158 r1260 196 196 std::vector<bool> localInitFlag(dataCurrentDest.numElements(), true); 197 197 currentBuff = 0; 198 bool firstPass=true; 198 199 for (itRecv = itbRecv; itRecv != iteRecv; ++itRecv) 199 200 { … … 204 205 dataCurrentDest, 205 206 localInitFlag, 206 ignoreMissingValue );207 ignoreMissingValue,firstPass); 207 208 208 209 currentBuff += countSize; 210 firstPass=false ; 209 211 } 210 212 -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.cpp
r1158 r1260 31 31 CArray<double,1>& dataOut, 32 32 std::vector<bool>& flagInitial, 33 bool ignoreMissingValue )33 bool ignoreMissingValue, bool firstPass) 34 34 { 35 35 if (resetWeight_) { weights_.resize(flagInitial.size()); weights_ = 1.0; resetWeight_ = false; } … … 41 41 double currentWeight = 0.0; 42 42 43 dataOut=std::numeric_limits<double>::quiet_NaN();43 if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN(); 44 44 45 45 for (int idx = 0; idx < nbLocalIndex; ++idx) -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/average_reduction.hpp
r1158 r1260 27 27 CArray<double,1>& dataOut, 28 28 std::vector<bool>& flagInitial, 29 bool ignoreMissingValue );29 bool ignoreMissingValue, bool firstPass); 30 30 31 31 virtual void updateData(CArray<double,1>& dataOut); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.cpp
r1158 r1260 30 30 CArray<double,1>& dataOut, 31 31 std::vector<bool>& flagInitial, 32 bool ignoreMissingValue )32 bool ignoreMissingValue, bool firstPass) 33 33 { 34 34 int nbLocalIndex = localIndex.size(); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/extract.hpp
r1158 r1260 27 27 CArray<double,1>& dataOut, 28 28 std::vector<bool>& flagInitial, 29 bool ignoreMissingValue );29 bool ignoreMissingValue, bool firstPass); 30 30 31 31 virtual ~CExtractReductionAlgorithm() {} -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.cpp
r1158 r1260 31 31 CArray<double,1>& dataOut, 32 32 std::vector<bool>& flagInitial, 33 bool ignoreMissingValue )33 bool ignoreMissingValue, bool firstPass) 34 34 { 35 35 if (ignoreMissingValue) … … 37 37 int nbLocalIndex = localIndex.size(); 38 38 int currentlocalIndex = 0; 39 dataOut=std::numeric_limits<double>::quiet_NaN();39 if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN(); 40 40 for (int idx = 0; idx < nbLocalIndex; ++idx) 41 41 { -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/max_reduction.hpp
r1158 r1260 27 27 CArray<double,1>& dataOut, 28 28 std::vector<bool>& flagInitial, 29 bool ignoreMissingValue );29 bool ignoreMissingValue, bool firstPass); 30 30 31 31 virtual ~CMaxReductionAlgorithm() {} -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.cpp
r1158 r1260 31 31 CArray<double,1>& dataOut, 32 32 std::vector<bool>& flagInitial, 33 bool ignoreMissingValue )33 bool ignoreMissingValue, bool firstPass) 34 34 { 35 35 if (ignoreMissingValue) … … 37 37 int nbLocalIndex = localIndex.size(); 38 38 int currentlocalIndex = 0; 39 dataOut=std::numeric_limits<double>::quiet_NaN();39 if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN(); 40 40 for (int idx = 0; idx < nbLocalIndex; ++idx) 41 41 { -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/min_reduction.hpp
r1158 r1260 27 27 CArray<double,1>& dataOut, 28 28 std::vector<bool>& flagInitial, 29 bool ignoreMissingValue );29 bool ignoreMissingValue, bool firstPass); 30 30 31 31 virtual ~CMinReductionAlgorithm() {} -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/reduction.hpp
r1158 r1260 41 41 \param [in/out] dataOut Array contains local data 42 42 \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initialization 43 \param [in] firstPass indicate if it is the first time the apply funtion is called for a same transformation, in order to make a clean initialization 43 44 */ 44 45 virtual void apply(const std::vector<std::pair<int,double> >& localIndex, … … 46 47 CArray<double,1>& dataOut, 47 48 std::vector<bool>& flagInitial, 48 bool ignoreMissingValue ) = 0;49 bool ignoreMissingValue, bool firstPass) = 0; 49 50 /*! 50 51 Update local data -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.cpp
r1158 r1260 31 31 CArray<double,1>& dataOut, 32 32 std::vector<bool>& flagInitial, 33 bool ignoreMissingValue )33 bool ignoreMissingValue, bool firstPass) 34 34 { 35 35 if (ignoreMissingValue) … … 38 38 int currentlocalIndex = 0; 39 39 40 dataOut=std::numeric_limits<double>::quiet_NaN();40 if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN(); 41 41 42 42 for (int idx = 0; idx < nbLocalIndex; ++idx) -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/Functions/sum_reduction.hpp
r1158 r1260 27 27 CArray<double,1>& dataOut, 28 28 std::vector<bool>& flagInitial, 29 bool ignoreMissingValue );29 bool ignoreMissingValue, bool firstPass); 30 30 31 31 virtual ~CSumReductionAlgorithm() {} -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.cpp
r1158 r1260 69 69 CArray<double,1>& dataOut, 70 70 std::vector<bool>& flagInitial, 71 bool ignoreMissingValue )71 bool ignoreMissingValue, bool firstPass) 72 72 { 73 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue );73 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 74 74 } 75 75 -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_extract_domain.hpp
r1158 r1260 34 34 CArray<double,1>& dataOut, 35 35 std::vector<bool>& flagInitial, 36 bool ignoreMissingValue );36 bool ignoreMissingValue, bool firstPass); 37 37 38 38 virtual ~CAxisAlgorithmExtractDomain(); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.cpp
r1204 r1260 77 77 CArray<double,1>& dataOut, 78 78 std::vector<bool>& flagInitial, 79 bool ignoreMissingValue )79 bool ignoreMissingValue, bool firstPass) 80 80 { 81 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue );81 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 82 82 } 83 83 -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/axis_algorithm_reduce_domain.hpp
r1158 r1260 33 33 CArray<double,1>& dataOut, 34 34 std::vector<bool>& flagInitial, 35 bool ignoreMissingValue );35 bool ignoreMissingValue, bool firstPass); 36 36 37 37 virtual void updateData(CArray<double,1>& dataOut); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp
r1158 r1260 161 161 else domainDestination->domain_ref.setValue(domainDstRef); 162 162 163 163 164 // Here are attributes of source need tranfering 164 165 int niGloSrc = domainSource->ni_glo; -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.cpp
r1221 r1260 32 32 CArray<double,1>& dataOut, 33 33 std::vector<bool>& flagInitial, 34 bool ignoreMissingValue )34 bool ignoreMissingValue, bool firstPass ) 35 35 { 36 36 int nbLocalIndex = localIndex.size(); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/generic_algorithm_transformation.hpp
r1216 r1260 64 64 \param [in/out] flagInitial vector of boolean to mark the local index already initialized. True means there is a need for initalization 65 65 \param [in] ignoreMissingValue don't count missing value in operation if this flag is true 66 \param [in] firstPass indicate if it is the first time the apply funtion is called for a same transformation, in order to make a clean initialization 66 67 */ 67 68 virtual void apply(const std::vector<std::pair<int,double> >& localIndex, … … 69 70 CArray<double,1>& dataOut, 70 71 std::vector<bool>& flagInitial, 71 bool ignoreMissingValue );72 bool ignoreMissingValue, bool firstPass); 72 73 73 74 /*! -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.cpp
r1158 r1260 56 56 CArray<double,1>& dataOut, 57 57 std::vector<bool>& flagInitial, 58 bool ignoreMissingValue )58 bool ignoreMissingValue, bool firstPass) 59 59 { 60 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue );60 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 61 61 } 62 62 -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_extract_axis.hpp
r1158 r1260 33 33 CArray<double,1>& dataOut, 34 34 std::vector<bool>& flagInitial, 35 bool ignoreMissingValue );35 bool ignoreMissingValue, bool firstPass); 36 36 37 37 virtual ~CScalarAlgorithmExtractAxis(); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.cpp
r1158 r1260 84 84 } 85 85 86 void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, 87 const double* dataInput, 88 CArray<double,1>& dataOut, 89 std::vector<bool>& flagInitial, 90 bool ignoreMissingValue) 86 void CScalarAlgorithmReduceAxis::apply(const std::vector<std::pair<int,double> >& localIndex, const double* dataInput, CArray<double,1>& dataOut, 87 std::vector<bool>& flagInitial, bool ignoreMissingValue, bool firstPass) 91 88 { 92 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue );89 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 93 90 } 94 91 -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_axis.hpp
r1158 r1260 33 33 CArray<double,1>& dataOut, 34 34 std::vector<bool>& flagInitial, 35 bool ignoreMissingValue );35 bool ignoreMissingValue, bool firstPass); 36 36 37 37 virtual void updateData(CArray<double,1>& dataOut); -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.cpp
r1158 r1260 82 82 CArray<double,1>& dataOut, 83 83 std::vector<bool>& flagInitial, 84 bool ignoreMissingValue )84 bool ignoreMissingValue, bool firstPass) 85 85 { 86 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue );86 reduction_->apply(localIndex, dataInput, dataOut, flagInitial, ignoreMissingValue, firstPass); 87 87 } 88 88 -
XIOS/dev/XIOS_DEV_CMIP6/src/transformation/scalar_algorithm_reduce_domain.hpp
r1158 r1260 33 33 CArray<double,1>& dataOut, 34 34 std::vector<bool>& flagInitial, 35 bool ignoreMissingValue );35 bool ignoreMissingValue, bool firstPass); 36 36 37 37 virtual void updateData(CArray<double,1>& dataOut);
Note: See TracChangeset
for help on using the changeset viewer.