Ignore:
Timestamp:
05/12/20 11:52:13 (4 years ago)
Author:
ymipsl
Message:

XIOS coupling branch
Some updates.

First coupling test is beginning to work...

YM

File:
1 edited

Legend:

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

    r1872 r1875  
    7878         { 
    7979           EVENT_ID_UPDATE_DATA, EVENT_ID_READ_DATA, EVENT_ID_READ_DATA_READY, 
    80            EVENT_ID_ADD_VARIABLE, EVENT_ID_ADD_VARIABLE_GROUP 
     80           EVENT_ID_ADD_VARIABLE, EVENT_ID_ADD_VARIABLE_GROUP, EVENT_ID_GRID_COMPLETED 
    8181         }; 
    8282 
     
    111111         std::map<int, StdSize> getGridDataBufferSize(CContextClient* client, bool bufferForWriting = false); 
    112112 
    113          void setContextClient(CContextClient* newContextClient); 
    114          CContextClient* getContextClient(); 
    115  
     113       public: 
     114          void makeGridAliasForCoupling(void) ; 
    116115       public: 
    117116         bool isActive(bool atCurrentTimestep = false) const; 
     
    144143 
    145144         void sendFieldToFileServer(void) ; 
     145         void sendCloseDefinition(void) ; 
     146       
     147      public: 
     148         void sendFieldToCouplerOut(void) ; 
     149      private: 
     150         bool sendFieldToCouplerOut_done_=false; 
     151      public: 
     152 
    146153         void sendFieldToInputFileServer(void) ; 
    147154 
     
    177184        void sendAllAttributesToServer(CContextClient* client) ;  
    178185        void sendUpdateData(const CArray<double,1>& data); 
    179         void sendUpdateData(const CArray<double,1>& data, CContextClient* client); 
     186        void sendUpdateData(Time timestamp, const CArray<double,1>& data, CContextClient* client); 
    180187        static void recvUpdateData(CEventServer& event); 
    181188        void recvUpdateData(std::map<int,CBufferIn*>& rankBuffers); 
     189        void recvUpdateDataFromClient(std::map<int,CBufferIn*>& rankBuffers); 
     190        void recvUpdateDataFromCoupler(std::map<int,CBufferIn*>& rankBuffers); 
     191         
    182192        void writeField(void); 
    183193        bool sendReadDataRequest(const CDate& tsDataRequested, CContextClient* client); 
     
    188198        static void recvReadDataReady(CEventServer& event); 
    189199        void recvReadDataReady(vector<int> ranks, vector<CBufferIn*> buffers); 
     200        void recvDataFromCoupler(vector<int> ranks, vector<CBufferIn*> buffers) ; 
    190201        void checkForLateDataFromServer(void); 
    191         void checkIfMustAutoTrigger(void); 
    192         void autoTriggerIfNeeded(void); 
     202        void checkForLateDataFromCoupler(void) ; 
     203 
     204        void checkIfMustAutoTrigger(void); // ym obsolete 
     205        void autoTriggerIfNeeded(void); //ym obsolete 
     206        void triggerLateField(void) ; 
     207 
    193208        void outputField(CArray<double,3>& fieldOut); 
    194209        void outputField(CArray<double,2>& fieldOut); 
     
    227242 
    228243        void connectToFileServer(CGarbageCollector& gc) ; 
     244        void connectToCouplerOut(CGarbageCollector& gc) ; 
     245        void connectToCouplerIn(CGarbageCollector& gc) ; 
    229246        void connectToModelInput(CGarbageCollector& gc) ; 
    230247        void connectToFileWriter(CGarbageCollector& gc) ; 
     
    241258                                                 map<CContextClient*,map<int,size_t>>& maxEventSize,  
    242259                                                 bool bufferForWriting) ; 
     260      private: 
     261          bool isGridCompleted_ = true ; 
     262      public: 
     263          bool isGridCompleted() { return isGridCompleted_ ;}  
     264          void setGridCompleted(void) { isGridCompleted_= true; } 
     265          void unsetGridCompleted(void) { isGridCompleted_ = false ;} 
     266       
     267      public:      
     268          void sendGridCompleted(void) ; 
     269      private:    
     270          static void recvGridCompleted(CEventServer& event); 
     271          void recvGridCompleted(CBufferIn& buffer); 
     272 
     273 
    243274      private: 
    244275        std::vector<CGrid*> getGridPath(void) ; 
     
    315346      private: 
    316347         CContextClient* client; 
     348      public: 
     349         void setContextClient(CContextClient* newContextClient); 
     350         CContextClient* getContextClient(void) {return client;} 
     351 
     352      private: 
    317353 
    318354         bool areAllReferenceSolved; 
Note: See TracChangeset for help on using the changeset viewer.