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/client_server_mapping.cpp

    r554 r567  
    2626} 
    2727 
     28void CClientServerMapping::computeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 
     29                                                     const CArray<int,1>& localIndexOnClient, 
     30                                                     const std::vector<CArray<size_t,1>* >& globalIndexOnServer) 
     31{ 
     32  defaultComputeServerIndexMapping(globalIndexOnClient, globalIndexOnServer, &localIndexOnClient); 
     33} 
     34 
    2835/*! 
    2936   Compute index of data which are sent to server and index global on server side 
     
    3239*/ 
    3340void CClientServerMapping::defaultComputeServerIndexMapping(const CArray<size_t,1>& globalIndexOnClient, 
    34                                                             const std::vector<CArray<size_t,1>* >& globalIndexServer) 
     41                                                            const std::vector<CArray<size_t,1>* >& globalIndexServer, 
     42                                                            const CArray<int,1>* localIndexOnClient) 
    3543{ 
    3644  int nServer = globalIndexServer.size(); 
     
    5260        // Just try to calculate local index server on client side 
    5361        (indexGlobalOnServer_[j]).push_back((globalIndexOnClient)(i)); 
    54         (localIndexSend2Server_[j]).push_back(i); 
     62        if (0 != localIndexOnClient) (localIndexSend2Server_[j]).push_back((*localIndexOnClient)(i)); 
     63        else 
     64          (localIndexSend2Server_[j]).push_back(i); 
    5565        continue; 
    5666      } 
Note: See TracChangeset for help on using the changeset viewer.