Ignore:
Timestamp:
12/16/14 12:55:53 (10 years ago)
Author:
mhnguyen
Message:

Reorganizing structure of grid

+) Grid doesn't have domain_ref and axis_ref anymore.
All domain and axis of a grid must be inside grid (These domain and axis can be defined or refer to others)
+) Grid contains list of domain and axis
+) Reorder some functions to make sure new functionlities work

Test
+) On Curie
+) Mode attached and detached
+) Only test_new_features
+) Passed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/grid.hpp

    r509 r540  
    1818   class CGridGroup; 
    1919   class CGridAttributes; 
     20   class CDomainGroup; 
     21   class CAxisGroup; 
    2022   class CGrid; 
    2123 
     
    4446         enum EEventId 
    4547         { 
    46            EVENT_ID_INDEX 
     48           EVENT_ID_INDEX, EVENT_ID_ADD_DOMAIN, EVENT_ID_ADD_AXIS 
    4749         } ; 
    4850 
     
    9698         void outputField(int rank, const CArray<double,1>& stored,  CArray<double,1>& field)  ; 
    9799 
     100         virtual void parse(xml::CXMLNode & node); 
     101 
    98102         /// Destructeur /// 
    99103         virtual ~CGrid(void); 
     
    110114         static CGrid* createGrid(CDomain* domain); 
    111115         static CGrid* createGrid(CDomain* domain, CAxis* axis); 
     116         static CGrid* createGrid(std::vector<CDomain*> domains, std::vector<CAxis*> axis); 
    112117 
    113118      public : 
     
    124129         void solveDomainRef(bool checkAtt); 
    125130         void solveAxisRef(bool checkAtt); 
     131         void solveDomainAxisRefInheritance(bool apply = true); 
     132 
     133         void sendAddDomain(const std::string& id=""); 
     134         void sendAddAxis(const std::string& id=""); 
     135         void sendAllDomains(); 
     136         void sendAllAxis(); 
     137 
     138         static void recvAddDomain(CEventServer& event) ; 
     139         void recvAddDomain(CBufferIn& buffer) ; 
     140         static void recvAddAxis(CEventServer& event) ; 
     141         void recvAddAxis(CBufferIn& buffer) ; 
    126142 
    127143         static bool dispatchEvent(CEventServer& event) ; 
     
    134150         std::map<int, int> getDomConServerSide(); 
    135151         std::map<int, StdSize> getConnectedServerDataSize(); 
     152         std::vector<StdString> getDomainList(); 
     153         std::vector<StdString> getAxisList(); 
     154         std::vector<CDomain*> getDomains(); 
     155         std::vector<CAxis*> getAxis(); 
     156 
    136157      public: 
    137158 
     
    167188         std::map<int, int> domConnectedServerSide_; 
    168189         bool isDomConServerComputed_; 
     190 
     191      private: 
     192        void setVirtualDomainGroup(CDomainGroup* newVDomainGroup); 
     193        void setVirtualDomainGroup(); 
     194        void setVirtualAxisGroup(CAxisGroup* newVAxisGroup); 
     195        void setVirtualAxisGroup(); 
     196//        void setAxisList(); 
     197        void setAxisList(const std::vector<CAxis*> axis = std::vector<CAxis*>()); 
     198//        void setDomainList(); 
     199        void setDomainList(const std::vector<CDomain*> domains = std::vector<CDomain*>()); 
     200 
     201        CDomain* addDomain(const std::string& id); 
     202        CAxis* addAxis(const std::string& id); 
     203 
     204        CAxisGroup* getVirtualAxisGroup() const; 
     205        CDomainGroup* getVirtualDomainGroup() const; 
     206      private: 
     207        CDomainGroup* vDomainGroup_; 
     208        CAxisGroup* vAxisGroup_; 
     209        std::vector<std::string> axisList_, domList_; 
     210        bool isAxisListSet, isDomListSet; 
     211 
     212        // List order of axis in a grid, if there is a domain, it will take value -1 
     213        std::vector<int> axisOrder_; 
    169214   }; // class CGrid 
    170215 
Note: See TracChangeset for help on using the changeset viewer.