Changeset 2228 for XIOS/dev/dev_ym
- Timestamp:
- 09/14/21 09:37:55 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_extract.cpp
r2227 r2228 189 189 { 190 190 { 191 int iIdxSrc = sourceWorkflowIdx(i)%domainSource->ni _glo-destIBegin;192 int jIdxSrc = sourceWorkflowIdx(i)/domainSource->ni _glo-destJBegin;191 int iIdxSrc = sourceWorkflowIdx(i)%domainSource->ni-destIBegin; 192 int jIdxSrc = sourceWorkflowIdx(i)/domainSource->ni-destJBegin; 193 193 int extractedSrcWFIdx = jIdxSrc * niDest + iIdxSrc; 194 194 if ((extractedSrcWFIdx>=0)&&(extractedSrcWFIdx<niDest*njDest)) … … 198 198 } 199 199 } 200 201 int iIdxSrcMin = INT_MAX; 202 int jIdxSrcMin = INT_MAX; 203 for (int countSrc = 0; countSrc < indexSize ; ++countSrc) 204 { 205 if ( sourceGlobalIdx(countSrc)%domainSource->ni_glo < iIdxSrcMin ) 206 iIdxSrcMin = sourceGlobalIdx(countSrc)%domainSource->ni_glo; 207 if ( sourceGlobalIdx(countSrc)/domainSource->ni_glo < jIdxSrcMin ) 208 jIdxSrcMin = sourceGlobalIdx(countSrc)/domainSource->ni_glo; 209 } 200 210 201 211 int countDest(0); // increment of the position in destination domain 202 for (int countSrc = 0; countSrc < indexSize ; ++countSrc) { 212 for (int countSrc = 0; countSrc < indexSize ; ++countSrc) 213 { 203 214 int iIdxSrc = sourceGlobalIdx(countSrc)%domainSource->ni_glo; 204 215 int jIdxSrc = sourceGlobalIdx(countSrc)/domainSource->ni_glo; … … 211 222 domainDest_->j_index(countDest) = jIdxSrc-extractJBegin_; 212 223 224 // ------------------ define transformation only if in the WF ------------------ 225 int convert_locally_global_idx = (jIdxSrc-jIdxSrcMin)*domainSource->ni + (iIdxSrc-iIdxSrcMin) ; 213 226 bool concerned_by_WF(false); 214 227 for ( int i = 0 ; i<sourceWorkflowIdx.numElements() ; ++i ) 215 228 { 216 if (sourceWorkflowIdx(i)==co untSrc)229 if (sourceWorkflowIdx(i)==convert_locally_global_idx) 217 230 { 218 231 concerned_by_WF = true; … … 224 237 transformationMapping_[extractNi_*(jIdxSrc-extractJBegin_)+iIdxSrc-extractIBegin_]=sourceGlobalIdx(countSrc); 225 238 } 239 // ----------------------------------------------------------------------------- 226 240 227 241 int iIdxDestLocal = countDest%niDest;
Note: See TracChangeset
for help on using the changeset viewer.