Changeset 2190 for XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation
- Timestamp:
- 07/20/21 16:22:31 (3 years ago)
- Location:
- XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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.