Ignore:
Timestamp:
06/28/18 17:53:42 (6 years ago)
Author:
oabramkina
Message:

The zoom is dead, long live the zoom.

Replacing domain_zoom transformation by copying it from domain_extract. From now on, only the zoomed part of a domain is sent to servers. On the user's side all definitions stay the same.

To do soon: axis_zoom.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/io/nc4_data_input.cpp

    r1486 r1553  
    6363      case ONE_FILE: 
    6464      { 
    65 /* 
    66         std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal(); 
    67         std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer(); 
    68         std::vector<int> nZoomSizeServer  = grid->getDistributionServer()->getZoomSizeServer(); 
    69  
    70         int ssize = nZoomBeginGlobal.size(); 
    71  
    72         std::vector<StdSize> start(ssize); 
    73         std::vector<StdSize> count(ssize); 
    74  
    75         for (int i = 0; i < ssize; ++i) 
    76         { 
    77           start[i] = nZoomBeginServer[ssize - i - 1] - nZoomBeginGlobal[ssize - i - 1]; 
    78           count[i] = nZoomSizeServer[ssize - i - 1]; 
    79         } 
    80 */ 
    81  
    82         std::vector<int> nZoomBeginGlobal = grid->getDistributionServer()->getZoomBeginGlobal(); 
    83         std::vector<int> nZoomBeginServer = grid->getDistributionServer()->getZoomBeginServer(); 
    84         std::vector<int> nZoomSizeServer  = grid->getDistributionServer()->getZoomSizeServer(); 
    85  
    8665        std::vector<StdSize> start, count; 
    8766 
     
    9170        int numElement = axisDomainOrder.numElements(); 
    9271        int idxDomain = domainList.size() - 1, idxAxis = axisList.size() - 1; 
    93         int idx = nZoomBeginGlobal.size() - 1; 
    94  
    95         start.reserve(nZoomBeginGlobal.size()); 
    96         count.reserve(nZoomBeginGlobal.size()); 
     72        int idx = domainList.size() * 2 + axisList.size() - 1; 
     73 
     74        start.reserve(idx+1); 
     75        count.reserve(idx+1); 
    9776 
    9877        for (int i = numElement - 1; i >= 0; --i) 
     
    10382            if ((domain->type) != CDomain::type_attr::unstructured) 
    10483            { 
    105               start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 
    106               count.push_back(nZoomSizeServer[idx]); 
     84              start.push_back(domain->jbegin); 
     85              count.push_back(domain->nj); 
    10786            } 
    10887            --idx ; 
    109             start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 
    110             count.push_back(nZoomSizeServer[idx]); 
     88            start.push_back(domain->ibegin); 
     89            count.push_back(domain->ni); 
     90 
    11191            --idx ; 
    11292            --idxDomain; 
     
    11494          else if (1 == axisDomainOrder(i)) 
    11595          { 
    116             start.push_back(nZoomBeginServer[idx] - nZoomBeginGlobal[idx]); 
    117             count.push_back(nZoomSizeServer[idx]); 
     96            CAxis* axis = CAxis::get(axisList[idxAxis]); 
     97            start.push_back(axis->begin); 
     98            count.push_back(axis->n); 
    11899            --idx; 
    119100          } 
Note: See TracChangeset for help on using the changeset viewer.