Changeset 2190
- Timestamp:
- 07/20/21 16:22:31 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/domain.cpp
r2185 r2190 1125 1125 { 1126 1126 ind=j*ni+i ; 1127 if ( !domainMask(ind))1127 if ( (ind<0)||(!domainMask(ind)) ) 1128 1128 { 1129 1129 data_i_index(k) = -1; … … 1155 1155 data_i_index(k) = -1; 1156 1156 1157 if ( !domainMask(i)) data_i_index(k) = -1;1157 if ( (i<0)||(!domainMask(i)) ) data_i_index(k) = -1; 1158 1158 } 1159 1159 } … … 1177 1177 if (i>=0 && i < domainMask.size()) 1178 1178 { 1179 if (domainMask(i)) 1179 if ( (i<0)||(!domainMask(i)) ) 1180 data_i_index(k) = -1; 1181 else 1180 1182 data_i_index(k) = k; 1181 else1182 data_i_index(k) = -1;1183 1183 } 1184 1184 else … … 1201 1201 if (i>=0 && i<ni && j>=0 && j<nj) 1202 1202 { 1203 if (domainMask(ind)) 1203 if ( (ind<0)||(!domainMask(ind)) ) 1204 { 1205 data_i_index(count) = -1; 1206 data_j_index(count) = -1; 1207 } 1208 else 1204 1209 { 1205 1210 data_i_index(count) = ki; 1206 1211 data_j_index(count) = kj; 1207 }1208 else1209 {1210 data_i_index(count) = -1;1211 data_j_index(count) = -1;1212 1212 } 1213 1213 } -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_extract.cpp
r2186 r2190 195 195 domainDest_->j_index(countDest) = jIdxSrc-extractJBegin_; 196 196 transformationMapping_[extractNi_*(jIdxSrc-extractJBegin_)+iIdxSrc-extractIBegin_]=sourceGlobalIdx(countSrc); 197 if ( sourceFullIdx(countSrc)==sourceWorkflowIdx(countSrc-countMasked) ) 198 { 199 domainDest_->mask_1d(countDest) = 1; 200 } 201 else { 197 if ( ( (countSrc-countMasked) >= sourceWorkflowIdx.numElements() ) 198 || ( sourceFullIdx(countSrc)!=sourceWorkflowIdx(countSrc-countMasked) ) ) 199 { 202 200 domainDest_->mask_1d(countDest) = 0; 203 201 // if point masked, manage offset between full and worfklow views of domainSource 204 202 countMasked++; 203 } 204 else { 205 domainDest_->mask_1d(countDest) = 1; 205 206 } 206 207 … … 262 263 } 263 264 else 264 if ( sourceFullIdx(countSrc)!=sourceWorkflowIdx(countSrc-countMasked) ) 265 if ( ( (countSrc-countMasked) >= sourceWorkflowIdx.numElements() ) 266 || ( sourceFullIdx(countSrc)!=sourceWorkflowIdx(countSrc-countMasked) ) ) 265 267 { 266 268 // manage offset between full and worfklow views of domainSource even if point i is not concerned -
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_reorder.cpp
r2184 r2190 110 110 int countMasked(0); // countMasked will store the offset index between full and workflow views 111 111 for (size_t i = 0; i < indexSize ; ++i) { 112 if ( sourceFullIdx(i)==sourceWorkflowIdx(i-countMasked) ) { 113 domainDestination->mask_1d(i) = 1; 112 if ( ( (i-countMasked) >= sourceWorkflowIdx.numElements() ) 113 || ( sourceFullIdx(i)!=sourceWorkflowIdx(i-countMasked) ) ) { 114 domainDestination->mask_1d(i) = 0; 115 countMasked++; 114 116 } 115 117 else { 116 domainDestination->mask_1d(i) = 0; 117 countMasked++; 118 domainDestination->mask_1d(i) = 1; 118 119 } 119 120 }
Note: See TracChangeset
for help on using the changeset viewer.