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/scalar.hpp

    r1870 r1875  
    7272            void checkAttributesOnClient(); 
    7373            virtual void parse(xml::CXMLNode & node); 
    74  
    75             bool checkIfCompleted(void) ; 
    76             void setCompleted(void) ; 
    77             void setUncompleted(void) ; 
    78           
     74         
    7975         public: 
    8076            void sendScalarToFileServer(CContextClient* client) ; 
    8177         private: 
    8278            std::set<CContextClient*> sendScalarToFileServer_done_ ; 
     79 
     80         public: 
     81            void sendScalarToCouplerOut(CContextClient* client, const string& fieldId, int posInGrid) ; 
     82         private: 
     83            std::set<CContextClient*> sendScalarToCouplerOut_done_ ; 
     84          
     85         public: 
     86            void makeAliasForCoupling(const string& fieldId, int posInGrid) ; 
    8387 
    8488         public: 
     
    8993           CTransformation<CScalar>* addTransformation(ETranformationType transType, const StdString& id=""); 
    9094           bool isEqual(CScalar* scalar); 
    91  
     95        private:   
     96          /** Clients that have to send a scalar. There can be multiple clients in case of secondary server, otherwise only one client. */ 
     97         std::list<CContextClient*> clients; 
     98         std::set<CContextClient*> clientsSet; 
     99        public: 
     100          void setContextClient(CContextClient* contextClient) ; 
     101         
    92102         private: 
    93103           std::set<StdString> relFiles; 
     
    103113           /** define if the scalar is completed or not ie all attributes have been received before in case  
    104114               of grid reading from file or coupling */  
    105            bool isCompleted_=true ;   
     115      private: 
     116         /** define if the scalar is completed or not ie all attributes have been received before in case  
     117             of grid reading from file or coupling */  
     118         bool isCompleted_=true ;   
     119      public:      
     120         /*! 
     121           \brief Check if a scalar is completed 
     122           Before make any scalar processing, we must be sure that all scalar informations have 
     123           been sent, for exemple when reading a grid in a file or when grid elements are sent by an 
     124           other context (coupling). So all direct reference of the scalar (scalar_ref) must be also completed 
     125           \return true if scalar and scalar reference are completed 
     126          */ 
     127         bool isCompleted(void) 
     128         { 
     129           if (hasDirectScalarReference()) if (!getDirectScalarReference()->isCompleted()) return false; 
     130           else return isCompleted_ ; 
     131         } 
     132         void setCompleted(void) { isCompleted_=true ; } 
     133         void unsetCompleted(void) { isCompleted_=false ; } 
    106134 
     135      private: 
    107136            DECLARE_REF_FUNC(Scalar,scalar) 
    108137 
Note: See TracChangeset for help on using the changeset viewer.