mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-20 11:48:35 -06:00
Now allocating the correct amount of memory for results data
The data size was multiplied by the number of components, which is wrong for the current interface.
This commit is contained in:
parent
5f1b7f2fad
commit
c22119e6a3
@ -967,7 +967,7 @@ void RifOdbReader::readNodeField(const std::string& fieldName, int partIndex, in
|
||||
|
||||
std::map<int, int>& nodeIdToIdxMap = m_nodeIdToIdxMaps[partIndex];
|
||||
|
||||
size_t dataSize = nodeIdToIdxMap.size()*compCount;
|
||||
size_t dataSize = nodeIdToIdxMap.size();
|
||||
if (dataSize > 0)
|
||||
{
|
||||
for (int comp = 0; comp < compCount; comp++)
|
||||
@ -1018,7 +1018,7 @@ void RifOdbReader::readElementNodeField(const std::string& fieldName, int partIn
|
||||
size_t compCount = componentsCount(fieldName, ELEMENT_NODAL);
|
||||
CVF_ASSERT(compCount == resultValues->size());
|
||||
|
||||
size_t dataSize = resultItemCount(fieldName, partIndex, stepIndex, frameIndex)*compCount;
|
||||
size_t dataSize = resultItemCount(fieldName, partIndex, stepIndex, frameIndex);
|
||||
if (dataSize > 0)
|
||||
{
|
||||
for (int comp = 0; comp < compCount; comp++)
|
||||
@ -1089,7 +1089,7 @@ void RifOdbReader::readIntegrationPointField(const std::string& fieldName, int p
|
||||
size_t compCount = componentsCount(fieldName, INTEGRATION_POINT);
|
||||
CVF_ASSERT(compCount == resultValues->size());
|
||||
|
||||
size_t dataSize = resultItemCount(fieldName, partIndex, stepIndex, frameIndex)*compCount;
|
||||
size_t dataSize = resultItemCount(fieldName, partIndex, stepIndex, frameIndex);
|
||||
if (dataSize > 0)
|
||||
{
|
||||
for (int comp = 0; comp < compCount; comp++)
|
||||
|
Loading…
Reference in New Issue
Block a user