- Timestamp:
- 11/05/18 13:57:52 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_olga/src/transformation/generic_algorithm_transformation.cpp
r1584 r1589 846 846 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight, 847 847 int nlocalIndexDest) 848 849 //void CGenericAlgorithmTransformation::computeTransformationMappingNonDistributed(int elementPositionInGrid, CGrid* gridSrc, CGrid* gridDst,850 // vector<int>& localSrc, vector<int>& localDst, vector<double>& weight,851 // vector<bool>& localMaskOnGridDest)852 848 { 853 849 … … 985 981 } 986 982 987 // just get the local src mask988 // CArray<bool,1> localMaskOnSrcGrid;989 // gridSrc->getLocalMask(localMaskOnSrcGrid) ;990 // intermediate grid, mask is not initialized => set up mask to true991 // if (localMaskOnSrcGrid.isEmpty())992 // {993 // localMaskOnSrcGrid.resize(nlocalIndexSrc) ;994 // localMaskOnSrcGrid=true ;995 // }996 997 998 // localMaskOnGridDest.resize(nlocalIndexDest,false) ;999 1000 983 vector<vector<vector<pair<int,double> > > > dstIndWeight(transformationMapping_.size()) ; 1001 984 … … 1038 1021 int& t, vector<vector<vector<pair<int,double> > > >& dstIndWeight, int currentInd, 1039 1022 vector<int>& localSrc, vector<int>& localDst, vector<double>& weight) 1040 // CArray<bool,1>& localMaskOnGridSrc1041 // , vector<bool>& localMaskOnGridDest )1042 1023 { 1043 1024 int masked_ ; … … 1052 1033 masked_=masked ; 1053 1034 if (!mask(i)) masked_=false ; 1054 // nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t, dstIndWeight, currentInd, localSrc, localDst, weight, localMaskOnGridSrc, localMaskOnGridDest) ;1055 1035 nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, srcIndCompressed, nIndexSrc, t, 1056 dstIndWeight, currentInd, localSrc, localDst, weight); //, localMaskOnGridDest) ;1036 dstIndWeight, currentInd, localSrc, localDst, weight); 1057 1037 } 1058 1038 } … … 1068 1048 for(vector<pair<int,double> >::iterator it = dstIndWeight[t][currentInd].begin(); it!=dstIndWeight[t][currentInd].end(); ++it) 1069 1049 { 1070 // if (localMaskOnGridSrc(srcInd)) 1071 { 1072 localSrc.push_back(srcIndCompressed) ; 1073 localDst.push_back(it->first) ; 1074 weight.push_back(it->second) ; 1075 // localMaskOnGridDest[it->first]=true ; 1076 } 1050 localSrc.push_back(srcIndCompressed) ; 1051 localDst.push_back(it->first) ; 1052 weight.push_back(it->second) ; 1077 1053 (it->first)++ ; 1078 1054 } 1079 1055 } 1080 1056 if (t < dstIndWeight.size()-1) t++ ; 1081 // if (localMaskOnGridSrc(srcInd))1082 1057 srcIndCompressed ++ ; 1083 1058 } … … 1100 1075 nonDistributedrecursiveFunct(currentPos-1, masked_, elementPositionInGrid, maskSrc, maskDst, srcInd, 1101 1076 srcIndCompressed, nIndexSrc, t, dstIndWeight , i, localSrc, localDst, weight); 1102 // localMaskOnGridSrc,1103 // localMaskOnGridDest) ;1104 1077 } 1105 1078 } … … 1115 1088 for(vector<pair<int,double> >::iterator it = dstIndWeight[t][i].begin(); it!=dstIndWeight[t][i].end(); ++it) 1116 1089 { 1117 // if (localMaskOnGridSrc(srcInd)) 1118 { 1119 localSrc.push_back(srcIndCompressed) ; 1120 localDst.push_back(it->first) ; 1121 weight.push_back(it->second) ; 1122 // localMaskOnGridDest[it->first]=true ; 1123 } 1090 localSrc.push_back(srcIndCompressed) ; 1091 localDst.push_back(it->first) ; 1092 weight.push_back(it->second) ; 1124 1093 (it->first)++ ; 1125 1094 } 1126 1095 } 1127 1096 if (t < dstIndWeight.size()-1) t++ ; 1128 // if (localMaskOnGridSrc(srcInd)) 1129 srcIndCompressed ++ ; 1097 srcIndCompressed ++ ; 1130 1098 } 1131 1099 srcInd++ ; … … 1135 1103 1136 1104 } 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1105 1148 1106 /*!
Note: See TracChangeset
for help on using the changeset viewer.