Ignore:
Timestamp:
03/10/15 10:49:02 (9 years ago)
Author:
mhnguyen
Message:

Implementing a grid formed by only one axis or group of axis

+) Add several new attributes to axis. From now on, each axis can be distributed on client side
+) Modify mask of grid to make it more flexible to different dimension
+) Fix some bugs relating to calculation of local data index on client
+) Clean some redundant codes

Test
+) On Curie, only test_new_features.f90
+) Test cases:

  • Grid composed of: 1 domain and 1 axis, 3 axis, 1 axis
  • Mode: Attached and connected
  • No of client-server: 6-2(Connected), 2 (Attached)

+) All tests passed and results are correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/distribution_server.cpp

    r553 r567  
    1919                                         const std::vector<int>& nZoomSize, const std::vector<int>& nGlobal) 
    2020  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nZoomSize_(nZoomSize), nZoomBegin_(nZoomBegin) 
     21{ 
     22  createGlobalIndex(); 
     23} 
     24 
     25CDistributionServer::CDistributionServer(int rank, const std::vector<int>& nZoomBegin, 
     26                                         const std::vector<int>& nZoomSize, 
     27                                         const std::vector<int>& nZoomBeginGlobal, 
     28                                         const std::vector<int>& nGlobal) 
     29  : CDistribution(rank, nGlobal.size()), nGlobal_(nGlobal), nZoomBeginGlobal_(nZoomBeginGlobal), 
     30    nZoomSize_(nZoomSize), nZoomBegin_(nZoomBegin) 
    2131{ 
    2232  createGlobalIndex(); 
     
    8999  for (int i = 0; i < ssize; ++i) 
    90100  { 
    91     it = std::lower_bound(it, itEnd, globalIndex(i)); 
     101    it = std::find(itBegin, itEnd, globalIndex(i)); 
     102//    it = std::lower_bound(it, itEnd, globalIndex(i)); 
    92103    if (itEnd != it) 
    93104    { 
     
    114125  for (int i = 0; i < ssize; ++i) 
    115126  { 
    116     it = std::lower_bound(it, itEnd, globalIndex(i)); 
     127    it = std::find(itBegin, itEnd, globalIndex(i)); 
     128//    it = std::lower_bound(it, itEnd, globalIndex(i)); 
    117129    if (itEnd != it) 
    118130    { 
     
    125137} 
    126138 
     139 
     140std::vector<int> CDistributionServer::getZoomBeginGlobal() const 
     141{ 
     142  return nZoomBeginGlobal_; 
     143} 
     144 
     145std::vector<int> CDistributionServer::getZoomBeginServer() const 
     146{ 
     147  return nZoomBegin_; 
     148} 
     149 
     150std::vector<int> CDistributionServer::getZoomSizeServer() const 
     151{ 
     152  return nZoomSize_; 
     153} 
    127154} // namespace xios 
Note: See TracChangeset for help on using the changeset viewer.