Changeset 1869 for XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
- Timestamp:
- 04/15/20 13:23:39 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/node/grid.hpp
r1853 r1869 71 71 void checkEligibilityForCompressedOutput(); 72 72 73 void solveDomainAxisRef(bool areAttributesChecked); 73 74 74 75 75 void checkMaskIndex(bool doCalculateIndex); … … 89 89 StdSize getDimension(void); 90 90 91 StdSize getDataSize(void) const;91 StdSize getDataSize(void) ; 92 92 93 93 /// Entrees-sorties de champs 94 94 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) ; 96 96 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) ; 98 98 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) ; 100 100 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) ; 102 102 103 103 virtual void parse(xml::CXMLNode& node); … … 133 133 void computeIndexScalarGrid(); 134 134 void computeWrittenIndex(); 135 void solveDomainAxisRef(bool areAttributesChecked); 136 void checkElementsAttributes(void) ; 135 137 136 138 void solveDomainRef(bool checkAtt); 137 139 void solveAxisRef(bool checkAtt); 138 140 void solveScalarRef(bool checkAtt); 139 void solve DomainAxisRefInheritance(bool apply = true);140 void solveTransformations();141 void solveElementsRefInheritance(bool apply = true); 142 // void solveTransformations(); 141 143 void solveDomainAxisBaseRef(); 142 144 … … 195 197 196 198 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 197 208 void completeGrid(CGrid* transformGridSrc = 0); 198 209 void doAutoDistribution(CGrid* transformGridSrc); … … 205 216 bool hasTransform(); 206 217 size_t getGlobalWrittenSize(void) ; 218 bool checkIfCompleted(void) ; 219 207 220 208 221 bool hasMask(void) const; … … 217 230 const CArray<int,1>& axisDomainOrder); 218 231 232 void computeGridIndexToFileServer(CContextClient* client) ; 233 219 234 private: 235 void computeClientDistribution(void) ; 236 bool computeClientDistribution_done_ = false ; 237 220 238 template<int N> 221 239 void checkGridMask(CArray<bool,N>& gridMask, … … 230 248 void modifyGridMaskSize(CArray<bool,N>& gridMask, const std::vector<int>& eachDimSize, bool newValue); 231 249 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) ; 236 254 237 255 void setVirtualDomainGroup(CDomainGroup* newVDomainGroup); … … 259 277 int getDistributedDimension(); 260 278 279 261 280 void computeClientIndex(); 262 void computeConnectedClients(); 281 bool computeClientIndex_done_ = false ; 282 283 void computeConnectedClients(CContextClient* client); 284 set<CContextClient*> computeConnectedClients_done_ ; 285 263 286 void computeClientIndexScalarGrid(); 264 void computeConnectedClientsScalarGrid(); 265 287 bool computeClientIndexScalarGrid_done_ = false ; 288 289 void computeConnectedClientsScalarGrid(CContextClient* client); 290 set<CContextClient*> computeConnectedClientsScalarGrid_done_ ; 266 291 267 292 public: … … 270 295 * Used to store field from model into the worklow, or to return field into models. 271 296 * 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_ ;} 273 301 274 302 /** Array containing the grid mask masked defined by the mask_nd grid attribute. 275 303 * The corresponding masked field value provided by the model will be replaced by a NaN value 276 304 * 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_ ;} 278 309 279 310 /** Map containing the indexes on client side that will be sent to each connected server. … … 419 450 420 451 template <int n> 421 void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const452 void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) 422 453 TRY 423 454 { … … 435 466 436 467 template <int n> 437 void CGrid::maskField(const CArray<double,n>& field, CArray<double,1>& stored) const468 void CGrid::maskField(const CArray<double,n>& field, CArray<double,1>& stored) 438 469 { 439 470 //#ifdef __XIOS_DEBUG … … 449 480 450 481 template <int n> 451 void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const482 void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) 452 483 TRY 453 484 { … … 471 502 */ 472 503 template <int N> 473 void CGrid::uncompressField(const CArray<double,N>& data, CArray<double,1>& outData) const504 void CGrid::uncompressField(const CArray<double,N>& data, CArray<double,1>& outData) 474 505 TRY 475 506 {
Note: See TracChangeset
for help on using the changeset viewer.