Ignore:
Timestamp:
09/08/16 11:18:51 (8 years ago)
Author:
rlacroix
Message:

Fix: Ensure that the buffer sizes needed to send the axis attributes are evaluated before actually sending any data.

This should avoid unexpected buffer requests (which would not cause any real issue most of the times since XIOS tries to recover from those).

File:
1 edited

Legend:

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

    r926 r927  
    166166   void CGrid::checkAttributesAfterTransformation() 
    167167   { 
    168      setDomainList(); 
    169      std::vector<CDomain*> domListP = this->getDomains(); 
    170      if (!domListP.empty()) 
    171      { 
    172        for (int i = 0; i < domListP.size(); ++i) 
    173        { 
    174          domListP[i]->checkAttributesOnClientAfterTransformation(); 
    175        } 
    176      } 
     168      setAxisList(); 
     169      std::vector<CAxis*> axisListP = this->getAxis(); 
     170      if (!axisListP.empty()) 
     171      { 
     172        int idx = 0; 
     173        axisPositionInGrid_.resize(0); 
     174        for (int i = 0; i < axis_domain_order.numElements(); ++i) 
     175        { 
     176          int elementDimension = axis_domain_order(i); 
     177          if (1 == elementDimension) 
     178          { 
     179            axisPositionInGrid_.push_back(idx); 
     180            ++idx; 
     181          } 
     182          else if (2 == elementDimension) idx += 2; 
     183        } 
     184 
     185        for (int i = 0; i < axisListP.size(); ++i) 
     186        { 
     187          axisListP[i]->checkAttributesOnClientAfterTransformation(globalDim_,axisPositionInGrid_[i]); 
     188        } 
     189      } 
     190 
     191      setDomainList(); 
     192      std::vector<CDomain*> domListP = this->getDomains(); 
     193      if (!domListP.empty()) 
     194      { 
     195        for (int i = 0; i < domListP.size(); ++i) 
     196        { 
     197          domListP[i]->checkAttributesOnClientAfterTransformation(); 
     198        } 
     199      } 
    177200   } 
    178201 
Note: See TracChangeset for help on using the changeset viewer.