Ignore:
Timestamp:
04/15/20 13:23:39 (4 years ago)
Author:
ymipsl
Message:

Some update...

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp

    r1853 r1869  
    7171         void checkEligibilityForCompressedOutput(); 
    7272 
    73          void solveDomainAxisRef(bool areAttributesChecked); 
     73 
    7474 
    7575         void checkMaskIndex(bool doCalculateIndex); 
     
    8989         StdSize getDimension(void); 
    9090 
    91          StdSize  getDataSize(void) const; 
     91         StdSize  getDataSize(void) ; 
    9292 
    9393         /// Entrees-sorties de champs 
    9494         template <int n> 
    95          void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const; 
     95         void inputField(const CArray<double,n>& field, CArray<double,1>& stored) ; 
    9696         template <int n> 
    97          void maskField(const CArray<double,n>& field, CArray<double,1>& stored) const; 
     97         void maskField(const CArray<double,n>& field, CArray<double,1>& stored) ; 
    9898         template <int n> 
    99          void outputField(const CArray<double,1>& stored, CArray<double,n>& field) const 
     99         void outputField(const CArray<double,1>& stored, CArray<double,n>& field)  
    100100         template <int n> 
    101          void uncompressField(const CArray<double,n>& data, CArray<double,1>& outData) const;  
     101         void uncompressField(const CArray<double,n>& data, CArray<double,1>& outData) ;  
    102102 
    103103         virtual void parse(xml::CXMLNode& node); 
     
    133133         void computeIndexScalarGrid(); 
    134134         void computeWrittenIndex(); 
     135         void solveDomainAxisRef(bool areAttributesChecked); 
     136         void checkElementsAttributes(void) ; 
    135137 
    136138         void solveDomainRef(bool checkAtt); 
    137139         void solveAxisRef(bool checkAtt); 
    138140         void solveScalarRef(bool checkAtt); 
    139          void solveDomainAxisRefInheritance(bool apply = true); 
    140         void solveTransformations(); 
     141         void solveElementsRefInheritance(bool apply = true); 
     142        // void solveTransformations(); 
    141143         void solveDomainAxisBaseRef(); 
    142144 
     
    195197 
    196198         void transformGrid(CGrid* transformGridSrc); 
     199          
     200         void prepareTransformGrid(CGrid* transformGridSrc); 
     201         bool prepareTransformGrid_done_ = false ; 
     202 
     203         void makeTransformGrid(void);  
     204         bool makeTransformGrid_done_ = false ; 
     205          
     206         std::vector<std::string> getAuxInputTransformGrid(void) ;  
     207 
    197208         void completeGrid(CGrid* transformGridSrc = 0); 
    198209         void doAutoDistribution(CGrid* transformGridSrc); 
     
    205216         bool hasTransform(); 
    206217         size_t getGlobalWrittenSize(void) ; 
     218         bool checkIfCompleted(void) ; 
     219 
    207220 
    208221         bool hasMask(void) const; 
     
    217230                                         const CArray<int,1>& axisDomainOrder); 
    218231 
     232         void computeGridIndexToFileServer(CContextClient* client) ; 
     233 
    219234      private: 
     235       void computeClientDistribution(void) ; 
     236       bool computeClientDistribution_done_ = false ; 
     237 
    220238       template<int N> 
    221239       void checkGridMask(CArray<bool,N>& gridMask, 
     
    230248        void modifyGridMaskSize(CArray<bool,N>& gridMask, const std::vector<int>& eachDimSize, bool newValue); 
    231249 
    232         void storeField_arr(const double* const data, CArray<double, 1>& stored) const; 
    233         void restoreField_arr(const CArray<double, 1>& stored, double* const data) const; 
    234         void uncompressField_arr(const double* const data, CArray<double, 1>& outData) const; 
    235         void maskField_arr(const double* const data, CArray<double, 1>& stored) const; 
     250        void storeField_arr(const double* const data, CArray<double, 1>& stored) ; 
     251        void restoreField_arr(const CArray<double, 1>& stored, double* const data) ; 
     252        void uncompressField_arr(const double* const data, CArray<double, 1>& outData) ; 
     253        void maskField_arr(const double* const data, CArray<double, 1>& stored) ; 
    236254 
    237255        void setVirtualDomainGroup(CDomainGroup* newVDomainGroup); 
     
    259277        int getDistributedDimension(); 
    260278 
     279        
    261280        void computeClientIndex(); 
    262         void computeConnectedClients(); 
     281        bool computeClientIndex_done_ = false ; 
     282         
     283        void computeConnectedClients(CContextClient* client); 
     284        set<CContextClient*> computeConnectedClients_done_ ; 
     285 
    263286        void computeClientIndexScalarGrid();  
    264         void computeConnectedClientsScalarGrid();  
    265  
     287        bool computeClientIndexScalarGrid_done_ = false ; 
     288 
     289        void computeConnectedClientsScalarGrid(CContextClient* client);  
     290        set<CContextClient*> computeConnectedClientsScalarGrid_done_ ; 
    266291 
    267292      public: 
     
    270295 *  Used to store field from model into the worklow, or to return field into models.   
    271296 *  The size of the array is the number of local index of the workflow grid */         
    272          CArray<int, 1> storeIndex_client_; 
     297        CArray<int, 1> storeIndex_client_; 
     298        void computeStoreIndex_client(void) ; 
     299        bool computeStoreIndex_client_done_ = false ; 
     300        CArray<int, 1>& getStoreIndex_client(void) { if (!computeStoreIndex_client_done_) computeStoreIndex_client() ; return storeIndex_client_ ;} 
    273301 
    274302/** Array containing the grid mask masked defined by the mask_nd grid attribute.         
    275303  * The corresponding masked field value provided by the model will be replaced by a NaN value 
    276304  * in the workflow.  */ 
    277          CArray<bool, 1> storeMask_client_; 
     305        CArray<bool, 1> storeMask_client_; 
     306        void computeStoreMask_client(void) ; 
     307        bool computeStoreMask_client_done_ = false ; 
     308        CArray<bool, 1>& getStoreMask_client(void) { if (!computeStoreMask_client_done_) computeStoreMask_client() ; return storeMask_client_ ;} 
    278309 
    279310/** Map containing the indexes on client side that will be sent to each connected server. 
     
    419450 
    420451   template <int n> 
    421    void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const 
     452   void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) 
    422453   TRY 
    423454   { 
     
    435466 
    436467   template <int n> 
    437    void CGrid::maskField(const CArray<double,n>& field, CArray<double,1>& stored) const 
     468   void CGrid::maskField(const CArray<double,n>& field, CArray<double,1>& stored) 
    438469   { 
    439470//#ifdef __XIOS_DEBUG 
     
    449480 
    450481   template <int n> 
    451    void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const 
     482   void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) 
    452483   TRY 
    453484   { 
     
    471502   */ 
    472503   template <int N> 
    473    void CGrid::uncompressField(const CArray<double,N>& data, CArray<double,1>& outData) const 
     504   void CGrid::uncompressField(const CArray<double,N>& data, CArray<double,1>& outData) 
    474505   TRY 
    475506   {       
Note: See TracChangeset for help on using the changeset viewer.