Ignore:
Timestamp:
03/06/19 12:11:10 (5 years ago)
Author:
oabramkina
Message:

Developments for visualization of XIOS workflow.

Branch is spawned from trunk r1649.

Boost library is used for producing Graphviz DOT files. Current results: a DOT file representing a static workflow. For a complete proof of concept, DOT files for each timestamp should be generated. The necessary information has been collected by XIOS, it only requires rearranging the information for graphing (changes in classes CWorkflowGraph and CGraphviz).

File:
1 edited

Legend:

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

    r1594 r1653  
    205205         bool hasTransform(); 
    206206         size_t getGlobalWrittenSize(void) ; 
    207 //         void getLocalMask(CArray<bool,1>& localMask) ; 
    208 //         template<int N> 
    209 //         void getLocalMask(const CArray<bool,N>& gridMask, CArray<bool,1>& localMask) ; 
    210207      public: 
    211208         CArray<int, 1> storeIndex_client; 
     
    377374   template <int n> 
    378375   void CGrid::inputField(const CArray<double,n>& field, CArray<double,1>& stored) const 
     376   TRY 
    379377   { 
    380378//#ifdef __XIOS_DEBUG 
     
    388386      this->storeField_arr(field.dataFirst(), stored); 
    389387   } 
     388   CATCH 
    390389 
    391390   template <int n> 
     
    405404   template <int n> 
    406405   void CGrid::outputField(const CArray<double,1>& stored, CArray<double,n>& field) const 
     406   TRY 
    407407   { 
    408408//#ifdef __XIOS_DEBUG 
     
    416416      this->restoreField_arr(stored, field.dataFirst()); 
    417417   } 
     418   CATCH 
    418419 
    419420   /*! 
     
    425426   template <int N> 
    426427   void CGrid::uncompressField(const CArray<double,N>& data, CArray<double,1>& outData) const 
     428   TRY 
    427429   {       
    428430     uncompressField_arr(data.dataFirst(), outData); 
    429431   } 
     432   CATCH 
    430433 
    431434   template<int N> 
     
    435438                             const CArray<int,1>& axisDomainOrder, 
    436439                             bool createMask) 
     440   TRY 
    437441   { 
    438442     int idx = 0; 
     
    530534    } 
    531535   } 
     536   CATCH_DUMP_ATTR 
    532537 
    533538   template<int N> 
     
    535540                                  const std::vector<int>& eachDimSize, 
    536541                                  bool newValue) 
     542   TRY 
    537543   { 
    538544      if (N != eachDimSize.size()) 
     
    549555      gridMask = newValue; 
    550556   } 
     557   CATCH_DUMP_ATTR 
    551558                                  
    552559 
     
    558565   template<int N> 
    559566   void CGrid::modifyGridMask(CArray<bool,N>& gridMask, const CArray<int,1>& indexToModify, bool valueToModify) 
     567   TRY 
    560568   {      
    561569     int num = indexToModify.numElements(); 
     
    565573     } 
    566574   } 
     575   CATCH_DUMP_ATTR 
     576 
    567577   ///-------------------------------------------------------------- 
    568578 
    569579 
    570 /*! 
    571   A grid can have multiple dimension, so can its mask in the form of multi-dimension array. 
    572 It's not a good idea to store all multi-dimension arrays corresponding to each mask. 
    573 One of the ways is to convert this array into 1-dimension one and every process is taken place on it. 
    574   \param [in] multi-dimension array grid mask 
    575 */ 
    576 //template<int N> 
    577 //void CGrid::getLocalMask(const CArray<bool,N>& gridMask, CArray<bool,1>& localMask) 
    578 //{ 
    579 //  if (gridMask.isEmpty()) return ; 
    580 //  int dim = gridMask.dimensions(); 
    581 //  std::vector<int> dimensionSizes(dim); 
    582 //  for (int i = 0; i < dim; ++i) dimensionSizes[i] = gridMask.extent(i); 
    583 // 
    584 //  std::vector<int> idxLoop(dim,0); 
    585 //  int ssize = gridMask.numElements(), idx = 0; 
    586 //  localMask.resize(ssize); 
    587 //  while (idx < ssize) 
    588 //  { 
    589 //    for (int i = 0; i < dim-1; ++i) 
    590 //    { 
    591 //      if (idxLoop[i] == dimensionSizes[i]) 
    592 //      { 
    593 //        idxLoop[i] = 0; 
    594 //        ++idxLoop[i+1]; 
    595 //      } 
    596 //    } 
    597 // 
    598 //    int maskIndex = idxLoop[0]; 
    599 //    int mulDim = 1; 
    600 //    for (int k = 1; k < dim; ++k) 
    601 //    { 
    602 //      mulDim *= dimensionSizes[k-1]; 
    603 //      maskIndex += idxLoop[k]*mulDim; 
    604 //    } 
    605 //    localMask(maskIndex) = *(gridMask.dataFirst()+maskIndex); 
    606 // 
    607 //    ++idxLoop[0]; 
    608 //    ++idx; 
    609 //  } 
    610 //} 
    611580 
    612581   // Declare/Define CGridGroup and CGridDefinition 
Note: See TracChangeset for help on using the changeset viewer.