Changeset 754


Ignore:
Timestamp:
10/23/15 10:49:18 (6 years ago)
Author:
rlacroix
Message:

Fix the buffer size estimation when using axis/domain bounds.

The number of vertices had been forgotten...

Location:
XIOS/trunk/src/node
Files:
2 edited

Legend:

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

    r747 r754  
    162162         size_t sizeValEvent = CArray<double,1>::size(it->second.size()); 
    163163         if (hasBounds_) 
    164            sizeValEvent += CArray<double,2>::size(it->second.size()); 
     164           sizeValEvent += CArray<double,2>::size(2 * it->second.size()); 
    165165 
    166166         size_t size = CEventClient::headerSize + getId().size() + sizeof(size_t) + std::max(sizeIndexEvent, sizeValEvent); 
  • XIOS/trunk/src/node/domain.cpp

    r747 r754  
    141141       size_t sizeLonLatEvent = CArray<double,1>::size(it->second.size()); 
    142142       if (hasBounds) 
    143          sizeLonLatEvent += CArray<double,2>::size(it->second.size()); 
     143         sizeLonLatEvent += CArray<double,2>::size(nvertex * it->second.size()); 
    144144 
    145145       size_t size = CEventClient::headerSize + getId().size() + sizeof(size_t) + std::max(sizeIndexEvent, sizeLonLatEvent); 
Note: See TracChangeset for help on using the changeset viewer.