Added block write to socket tools

This commit is contained in:
Magne Sjaastad
2014-04-01 15:31:13 +02:00
parent 3ec22a9221
commit 039ba48bed
7 changed files with 67 additions and 9 deletions

View File

@@ -334,7 +334,6 @@ public:
else
{
std::vector<double> values(rigGrid->cellCount());
for (size_t tsIdx = 0; tsIdx < timestepCount; tsIdx++)
{
cvf::ref<cvf::StructGridScalarDataAccess> cellCenterDataAccessObject = rimCase->reservoirData()->dataAccessObject(rigGrid, porosityModelEnum, requestedTimesteps[tsIdx], scalarResultIndex);
@@ -343,6 +342,7 @@ public:
continue;
}
std::vector<double> values(rigGrid->cellCount());
for (size_t cellIdx = 0; cellIdx < rigGrid->cellCount(); cellIdx++)
{
double cellValue = cellCenterDataAccessObject->cellScalar(cellIdx);
@@ -352,9 +352,8 @@ public:
}
values[valueIdx++] = cellValue;
}
RiaSocketTools::writeBlockData(server, server->currentClient(), (const char *)values.data(), values.size() * sizeof(double));
}
server->currentClient()->write((const char *)values.data(), rigGrid->cellCount() * sizeof(double));
}
double totalTimeMS = timer.time() * 1000.0;